コマンドでLevenbergMarquardtアルゴリズムを使用したいと思い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] = ...
このエラーを解決するにはどうすればよいですか?