MATLAB: Is it possible to fit 30 data points to a differential equation system of 5 equation to determine 13 unkown constants? (for instance with lsqcurvefit)

lsqcurvefitnon linear fittingoptimization

I already have a script, which uses lsqcurvefit, but the fit is really bad and depend strongly on initial values. In my opinion i would Need more data Points. Is there a way to predict the number of data Points you Need to solve this Problem? (sorry for this novice Question, but it is the first time i use Matlab in this way.)

Best Answer

The problem is not the number of data points, but the number of starting points. It is very typical to have multiple local minima in data-fitting problems. The hard part is to choose an appropriate initial point. See MultiStart Using lsqcurvefit or lsqnonlin.
It is also possible that you should set larger-than-default finite differences for lsqcurvefit. See Optimizaing a Simulation or ODE.
Good luck,
Alan Weiss
MATLAB mathematical toolbox documentation
Related Question