spasmous
Posts:
303
Registered:
12/10/05


Re: Problem with "lsqnonlin" function in matlab
Posted:
Aug 31, 2011 5:59 PM


On Aug 30, 12:34 am, "fsalehi " <fsal...@gmail.com> wrote: > I have a problem with 'lsqnonlin' function in matlab. I used it to optimizing this function: > > objfun = @(z) y  ( z(5).*exp(z(1).*(tz(7)).^2).*cos(2*pi.*z(2).*(tz(7))+z(3)) + z(6).*exp(z(1).*(tz(8)).^2).*cos(2*pi.*z(2).*(tz(8))+z(4)) ); > > % y is my signal and I optimize a guassian pulse function for Model Base Estimation > > options = optimset(options, 'MaxFunEvals', 10000, 'TolX', 1e3, 'TolFun', 1e2, 'MaxIter', 800, 'LargeScale', 'on', 'LevenbergMarquardt', 'on', 'DiffMaxChange', 1e7, 'DiffMinChange', 1e10, 'Display', 'off', 'Diagnostics', 'off'); >
i would try Display 'iter' to see what is happening. TolFun seems kind of large and DiffMaxChange kind of small. Aslo I'm not sure LargeScale, LevMarq and bound constraints are all compatible either.

