lsqcurvefit UseParallel error on matlab 2016b
Mostra commenti meno recenti
I am receiving a strange error when trying to use the lsqcurvefit. When executing the following (taken from https://uk.mathworks.com/help/optim/ug/lsqcurvefit.html) I receive an error 'Reference to non-existent field 'UseParallel'.' See below for full error.
Note, I did not receive this error on older version so of Matlab e.g. 2015a.
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)
Full Error:
Reference to non-existent field 'UseParallel'.
Error in computeFinDiffGradAndJac
Error in sfdnls (line 97) computeFinDiffGradAndJac(x,funfcn,confcn,valx, ...
Error in snls (line 179) [A,findiffevals] = sfdnls(xcurr,fvec,Jstr,group,[],funfcn,l,u,...
Error in lsqncommon (line 151) snls(funfcn,xC,lb,ub,flags.verbosity,options,defaultopt,initVals.F,initVals.J,caller, ...
Error in lsqcurvefit (line 257) lsqncommon(funfcn,xCurrent,lb,ub,options,defaultopt,caller,...
Thanks in advance for your help.
Risposte (1)
Alan Weiss
il 19 Gen 2017
0 voti
It sounds to me as if your MATLAB installation is corrupted somehow. Try reinstalling, or at least reinstalling Optimization Toolbox.
If reinstalling does not help, then please contact technical support.
Alan Weiss
MATLAB mathematical toolbox documentation
1 Commento
hcyork
il 19 Gen 2017
Categorie
Scopri di più su Systems of Nonlinear Equations in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!