I optimze a parameter (it is not an f(x) type dependence) on a dataset with lsqcurvefit. I always get "Local minimum possible"
However, if I ran manual loop and plot the sum of the squared residues, a minima is visible.
With default options, I get resonable results when starting from low numbers, e.g.10, when starting from higher values I get apparent minima ranging from 3000-7000 are found. Reason is likely the "roughness" of the squared residues vs. the parameter:
With playing with 'FunctionTolerance' the system now finds values ~ 2444, already quite good but not the actual mnima of 2398. Apperently the programm gets stuck in rather local mimima.
Are there any options I am missing?
Are there better ways than using lsqcurvefit?
I do not need a very accurate parameter, natural numbers woudl be suffitient.
Surely I coudl always run a loop through all posible parameters, but I hoped to save time with lsqcurvefit.
Surprizingly the "optimize" function ogf IgorPro handles this without problems, But I want too keep everything in MATLAB if possible.
Any advice is apprciated.