问题描述:
再问你个问题呗,在matlab中怎么建立y=b(1)*[x-b(2)]这个模型的M函数,代码怎么写啊?
呵呵 那个我知道了 不过还有个问题想麻烦您。我编的这个程序
clear all;
x=1:0.5:4.5;
y=[3.3 5.2 8.4 13.5 22 35.9 58.6 96];
beta=ones(2,3,1,2,3);
beta = nlinfit(x,y,@sd,beta);
结果出来yhat =
Columns 1 through 8 40.171 288.96 3289.9 60040 1.7697e+006 8.4654e+007 6.5941e+009 8.3839e+011
……
Function 'norm' is not defined for values of class 'double' and attributes 'full nd real'.
Error in ==> nlinfit at 204
if norm(step) < betatol*(sqrteps+norm(beta))怎么回事呢
呵呵 那个我知道了 不过还有个问题想麻烦您。我编的这个程序
clear all;
x=1:0.5:4.5;
y=[3.3 5.2 8.4 13.5 22 35.9 58.6 96];
beta=ones(2,3,1,2,3);
beta = nlinfit(x,y,@sd,beta);
结果出来yhat =
Columns 1 through 8 40.171 288.96 3289.9 60040 1.7697e+006 8.4654e+007 6.5941e+009 8.3839e+011
……
Function 'norm' is not defined for values of class 'double' and attributes 'full nd real'.
Error in ==> nlinfit at 204
if norm(step) < betatol*(sqrteps+norm(beta))怎么回事呢
问题解答:
我来补答展开全文阅读