I set my options to
options=optimset('LevenbergMarquardt', 'on')
and then employ lsqcurvefit
like below,
[x,resnorm,residual,exitflag,output] = lsqcurvefit(@myfun, [0.01 0.3], xdata, ydata, [-inf -inf], [inf inf], options)
but the problem is that I don't now why I will get for output :
output =
firstorderopt: 3.4390e-07
iterations: 4
funcCount: 15
cgiterations: 0
algorithm: 'large-scale: trust-region reflective Newton'
message: [1x425 char]
Does this mean Matlab did not use the algorithm Levenberg Marquardt?
But I did set my options to levenberg Marquardt algorithm!!!
I'd appreciate any help.
Sometimes a specific algorithm is not suitable for a specific configuration of an optimization problem. In these cases Matlab "falls back" to its default optimization algorithm.
It might be the case that for your specific problem/configuration Matlab is unable to use Levenberg-Marquardt algorithm.
Read the docs carefully to see if this is the case.