I have a set of reference data points to which I want to fit a sigmoidal curve. I can use the curve fitting tool of MATLAB to do this but I have a custom equation to fit to the data. The equation has 4-5 variables which I want to vary and then test for the goodness of fit.
I tried using the goodnessOfFit
function for this. But it requires the test data and reference data matrices to be of the same size. The numbers of reference data points that I have are few (15-20) and the number of test points generated by using the custom equation is large.
Is there any other way by which I can check the goodness of fit of the curve? Or do I have find the test data points corresponding to the points in the reference data and then use the goodnessOfFit
function (One problem with this approach is that I don't have the same resolution for the x axis in the test and reference data e.g. for a x-point 1.2368 in ref. data I have either 1.23 and 1.24 in my test data. I will have to round off the data and then calculate the fit).