title: MATLAB: lsqnonlin code from 2010b not working in 2008a
body: <p>I've written a script in MATLAB 2010 in which I called the lqnonlin function and it worked fine.</p>
  <pre><code>options = optimset('TolFun',0.001,...
                     'Display','off',...
                     'Algorithm','levenberg-marquardt');
  [X,R2,r] = lsqnonlin(@FCN,XO,[],[],options);
  </code></pre>
  <p>I then ran the code in MATLAB 2008a as follows (after reading <a href="https://stackoverflow.com/questions/7194790/matlab-lsqnonlin-changes-in-r2011a">MATLAB: LSQNONLIN changes in R2011a?</a>)</p>
  <pre><code>options = optimset('TolFun',0.01,...
                     'Display','off',...
                     'LargeScale','off',...
                     'LevenbergMarquardt','on')
  [X,R2,r] = lsqnonlin(@FCN,XO,[],[],options);
  </code></pre>
  <p>It's giving an output, but not giving the correct answer - in fact it remains unchanged from the original inputs</p>
  <p>Thinking/hoping it's to do with my options settings</p>
  <h2>Solved</h2>
  <p>Had to tweak 'TolFun' to a far lower setting. no idea why.</p>