title: Why does the function lsqcurvefit not seem to work in Matlab 2015b?
body: <p>I am using Matlab 2015b and the function lsqcurvefit does not seem to work. In fact, get the following error message</p>
  
  <pre><code>Diagnostic Information:
  Feature: Optimization_Toolbox
  License path:
  /home/username/.matlab/R2015b_licenses:/.netmount/app/MATLAB/R2015b/licenses/license.dat:/.netmount/app/MATLAB/R2015b/licenses/license.lic:/.netmount/app/MATLAB/R2015b/licenses/network.lic
  
  Licensing error: -18,147.
  
  Error in test (line 7)
  x = lsqcurvefit(fun,x0,xdata,ydata)
  </code></pre>
  
  <p>for the script below. Note that no error message appears when I comment out the last line with lsqcurvefit. Interestingly, the script works nicely in another machine with Matlab 2017a.</p>
  
  <pre><code>xdata = [0.9 1.5 13.8 19.8 24.1 28.2 35.2 60.3 74.6 81.3];
  ydata = [455.2 428.6 124.1 67.3 43.2 28.1 13.1 -0.4 -1.3 -1.5];
  
  fun = @(x,xdata)x(1)*exp(x(2)*xdata);
  
  x0 = [100,-1];
  x = lsqcurvefit(fun,x0,xdata,ydata)
  </code></pre>
  
  <p>Any thoughts please? Thanks</p>