MATLAB非線性方程回歸中系統(tǒng)提示錯誤
本人剛接觸MATLAB做非線性回歸擬合,運行結果中 系統(tǒng)會提示:lsqnonlin stopped because the final change in the sum of squares relative to its initial value is less than the default value of the function tolerance.? ? (相對平方和的最終變化的初始值小于該函數(shù)公差的默認值。)
不知是哪里出現(xiàn)問題了,大神們可否指點一下,先謝謝大家了!
返回小木蟲查看更多
今日熱帖
京公網(wǎng)安備 11010802022153號
這樣的比較難回答?有具體的模型和數(shù)據(jù)嗎?
x=[0;0.0909100000000000;0.148940000000000;0.230770000000000;0.272730000000000;0.310340000000000;0.400000000000000;0.500000000000000;0.571430000000000;0.666670000000000;0.800000000000000;1];
>> y=[0;0.399150000000000;0.558020000000000;0.597720000000000;0.637450000000000;0.697020000000000;0.776450000000000;0.849910000000000;0.883680000000000;0.925390000000000;0.935300000000000;0.984960000000000];
>> fun=@(p,x)(((x./p(3))./(1-(x./p(3))))+((p(1).*(x.^p(1)).*p(2)))./(1+x1.^p(1).*p(2)));
>> x0=[1,7,10];
>> p=lsqcurvefit(fun,x0,x1,y)
Local minimum possible.
lsqcurvefit stopped because the final change in the sum of squares relative to
its initial value is less than the default value of the function tolerance.
以上是我運行中的數(shù)據(jù),方程以及出現(xiàn)的問題,麻煩您給看看是哪里除了問題,謝謝
,
沒有出現(xiàn)你給出的警告。

但程序有幾個小錯誤,如
fun=@(p,x)(((x./p(3))./(1-(x./p(3))))+((p(1).*(x.^p(1)).*p(2)))./(1+x1.^p(1).*p(2))); %x1應該為x
p=lsqcurvefit(fun,x0,x1,y) %x1應該為x
把x1改成x,運行后可以得到如下結果
123a.jpg