小编遇到的问题如下:
需要对一组数据X和Y进行非线性回归,此时采用的函数为nlinfit,代码如下所示:
x1=[470 285 470 470 470 100 470 100 100 100 100 285 285]';
x2=[300 80 300 80 80 190 80 190 300 300 80 300 190]';
x3=[10 10 120 120 10 10 65 65 54 120 120 10 120]';
X=[x1 x2 x3];
Y=[8.55 3.79 4.82 0.02 2.75 14.39 2.54 4.35 13.00 8.5 0.05 11.32 3.13]';
beta=[-0.5 -0.3 0 0.2 0.4];
nlinfit(X,Y,'hougen',beta)
% nlintool(X,Y,'hougen',beta,0.01)% 调用工具箱
function yhat=hougen(b,x)
yhat=(b(1).*x(2)-x(3)./b(5))./(1+b(2).*x(1)+b(3).*x(2)+b(4).*x(3));
end
此时matlab返回的结果如下:
警告: Some columns of the Jacobian are effectively zero at the solution, indicating that the model is insensitive to some of its parameters. That may be
because those parameters are not present in the model, or otherwise do not affect the predicted values. It may also be due to numerical underflow