数学建模社区-数学中国
标题:
nlinfit函数问题,求各位帮帮忙
[打印本页]
作者:
seaying
时间:
2011-6-11 15:57
标题:
nlinfit函数问题,求各位帮帮忙
x=[0.25 0.5 0.75 1 1.5 2 2.5 3 3.5 4 4.5 5 6 7 8 9 10 11 12 13 14 15 16];
>> y=[30 68 75 82 82 77 68 68 58 51 50 41 38 35 28 25 18 15 12 10 7 7 4];
>> myfunc=inline('(beta(2)*beta(3)*(exp(-beta(1)*x)-exp(-beta(2)*x)))/(beta(2)-beta(1))','beta','x');
>> beta=nlinfit(x,y,myfunc,[0.5 0.5 0.5]);
Warning: Divide by zero.
> In inlineeval at 13
In inline.subsref at 25
In nlinfit at 74
Warning: Divide by zero.
> In inlineeval at 13
In inline.subsref at 25
In nlinfit at 152
Warning: Matrix is singular to working precision.
> In nlinfit at 161
>> k1=beta(1),k2=beta(2),k3=beta(3);
k1 =
NaN
k2 =
NaN
>> 为什么会出现警告呢?而且还没有数值结果,求指教
作者:
seaying
时间:
2011-6-11 15:57
在线等结果
作者:
seaying
时间:
2011-6-11 16:02
感觉是myfunc=inline('(beta(2)*beta(3)*(exp(-beta(1)*x)-exp(-beta(2)*x)))/(beta(2)-beta(1))','beta','x');
出问题的
作者:
madio
时间:
2011-6-11 21:38
提示的是出现除数为零的问题了!
作者:
alair003
时间:
2012-2-6 10:47
研究一下~~~~~~~~~~~~~
3235548277083277
欢迎光临 数学建模社区-数学中国 (http://www.madio.net/)
Powered by Discuz! X2.5