Actually I am trying to fit some data points with a model function to determine the parameter value (4 parameters). I am using lsqcurvefit function. But I am always getting "Local minimum possible" message and if I change the starting guess the result become different.
That is why I need a such algorithm which help me to determine perfect starting guess. Does your function help me?
My model is like that-
fun = @(x,xdata)x(1)*exp(-x(2)*xdata) + x(3)*exp(-x(4)*xdata);
There was a posting in the NG that looks like it could benefit from this tool, with a few modifications.
For one, the tool would need to allow an additional term depending only on the intrinsically non-linear parameters
Y = f0(X,C)+ a1*f1(X,C) + a2*f2(X,C) + ... + an*fn(X,C)
It looks like nearly the same methodology would accomodate this.
Secondly, it might be good to have the option, rather than passing the individual fi(X,C) as sepearate functions to allow the complete matrix
to be passed. For large n, there may be MATLAB-savvy vectorized ways of generating the complete matrix whereas generating column-by-column could be slow. The above NG post gives one such case.