lsqcurvefit UseParallel error on matlab 2016b
이전 댓글 표시
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.
답변 (1개)
Alan Weiss
2017년 1월 19일
0 개 추천
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
카테고리
도움말 센터 및 File Exchange에서 Systems of Nonlinear Equations에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!