1
我想在lsqcurvefit
命令中使用Levenberg Marquardt算法。我已經做了以下內容:使用lsqcurvefit中的選項
options = optimset('LevenbergMarquardt','on');
x = lsqcurvefit(@myfun,x0,xdata,ydata,options);
我得到以下錯誤:
??? Error using ==> optim\private\lsqncommon
LSQCURVEFIT only accepts inputs of data type double.
Error in ==> lsqcurvefit at 149
[x,Resnorm,FVAL,EXITFLAG,OUTPUT,LAMBDA,JACOB] = ...
如何克服這個問題?