nlsqalt.m

来自「Generalized Method of Moments(GMM) 广义矩方法」· M 代码 · 共 11 行

M
11
字号
function f=nlsqalt(b)
%function f=nlsqalt(b)
%
% Used in demo nlsq_d to compare with nonlinear least squares from minz.
% nlsqalt is the function used by the lsqnonlin, part of Matlab's 
% Optimization Toolbox.
 
nlsqdat
yhat =  b(1)*x + b(2)*x.^2 + b(3)*x.^3 + b(4)*cos(b(5)*x);
f = y - yhat;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?