F = 65535*(c(1)*cos(x*pi/180) + c(2)*(exp(((x*pi/180).^2)*(-log10(2))/c(3)^2))./cos(x*pi/180) + c(4))

(the constant 65535 is a guess value)Please check them and let me know your comment.

04 Apr 2011

RMSEARCH
Randomly multiply started optimizations for global problems
Author: John D'Errico

Dear John,
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);

02 Apr 2011

RMSEARCH
Randomly multiply started optimizations for global problems
Author: John D'Errico

I am having problem on rmsearch.m
Would please you take a look on line # 402

Do you mean that the linear parameters are to be the same for both terms? Then your model is simply
Y = a*(f1(X,C) + f2(X,C))
No explicit constraint is needed. Simply define one function as above.

Comment only

23 Aug 2011

Fminspleas
Efficient nonlinear regression fitting using a constrained, partitioned least squares overlay to fmi

There was a posting in the NG that looks like it could benefit from this tool, with a few modifications.
http://www.mathworks.com/matlabcentral/newsreader/view_thread/299811
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
F(X,C)=[f0(X,C), f1(X,C),...,fn(X,C)]
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.

Comment only