curve fitting - Why does the function lsqcurvefit not seem to work in Matlab 2015b? -
i using matlab 2015b , function lsqcurvefit not seem work. in fact, following error message
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)
for script below. note no error message appears when comment out last line lsqcurvefit. interestingly, script works nicely in machine matlab 2017a.
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)
any thoughts please? thanks
the command lsqcurvefit
not part of matlab, it's part of add-on product optimization toolbox. looks 17b installation has product, 15b installation not, you're getting error telling you don't have license product.
Comments
Post a Comment