I've written a script in MATLAB 2010 in which I called the lqnonlin function and it worked fine.
options = optimset('TolFun',0.001,... 'Display','off',... 'Algorithm','levenberg-marquardt'); [X,R2,r] = lsqnonlin(@FCN,XO,,,options);
I then ran the code in MATLAB 2008a as follows (after reading MATLAB: ¿LSQNONLIN cambia en R2011a?)
options = optimset('TolFun',0.01,... 'Display','off',... 'LargeScale','off',... 'LevenbergMarquardt','on') [X,R2,r] = lsqnonlin(@FCN,XO,,,options);
It's giving an output, but not giving the correct answer - in fact it remains unchanged from the original inputs
Thinking/hoping it's to do with my options settings
Had to tweak 'TolFun' to a far lower setting. no idea why.
preguntado el 08 de noviembre de 11 a las 09:11
Was a 'TolFun' issue. Had to set it far lower (1e-9). Though I have no idea why this is. The rest of the code is identical.