MATLAB: Does LSQNONLIN give different results in Optimization Toolbox 3.1.2 (R2007b) compared to Optimization Toolbox 6.0 (R2011a)

Optimization Toolbox

I am running some code that uses LSQNONLIN with two different versions of MATLAB R2007b and R2011a and I obtain different results in the optimization. The options that I have defined in OPTIMSET are the same in both cases:
options0=optimset('Display', 'off', 'TolFun', 1e-9, 'TolX', 1e-9, 'MaxIter', 2000,...
'MaxFunEvals', 2000, 'Jacobian', 'on');
However I receive a different solution. Why is that?

Best Answer

The change in behaviour is due to a change in the default option PrecondBandWidth (from zero to Inf) in MATLAB 7.6 (R2008a).
To obtain the same results just set the option 'PreCondBandWidth' to zero or Inf accordingly.
The default value of the PrecondBandWidth option changed from 0 to Inf for the LSQCURVEFIT, LSQNONLIN, and FSOLVE solvers.
For more information, please refer to the Compatibility Considerations section in the MATLAB 7.6 (R2008a) Release Notes.