24小时热门版块排行榜    

查看: 1411  |  回复: 13
当前只显示满足指定条件的回帖,点击这里查看本话题的所有回帖

vs570588

木虫 (正式写手)

[求助] 求高手,拟合求参数

function M=Monod(c,Y)
M= -c(1).*Y./(Y+c(2))


Y=[255.55 246.44 237.28 228.36 136.08 114 99.16 82.33 69.4 56.94 42.31 0];
x=[-0.78 -2.2268 -5.2033 -6.1377 -8.6137 -8.6428 -8.4792 -8.1692 -7.7128 -7.11 -6.3608 -1.9];
x=x/214.63;
c0=[0.03 0.3];beta=nlinfit(Y,x ,’Monod’,c0);
为了参数c(1),c(2),这个小程序快把我折磨死了。现在出来NLINFIT did NOT converge. Returning results from last iteration.
beta =

    0.0271
   -8.1892
按道理,-8.1892不合理。出来的参数应该和我预估的差不多。大家看看,这是怎样回事?
回复此楼

» 猜你喜欢

» 本主题相关价值贴推荐,对您同样有帮助:

已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

t= [0 2 7 9 19 22 24 26 28 30 32 40]';
c=[255.55 246.44 237.28 228.36 136.08 114 99.16 82.33 69.4 56.94 42.31 0]';
ft_ = fittype('k/(-1+exp(a*t)*C)',...
    'dependent',{'c'},'independent',{'t'},...
    'coefficients',{'k', 'a', 'C'});
st=[200 1.5 0.1]
[curve, goodness]= fit(t,c,ft_,'Startpoint',st)
figure
plot(curve,'predobs',0.95);
hold on,plot(t,c,'b*')

st =

  200.0000    1.5000    0.1000


curve =

     General model:
     curve(t) = k/(-1+exp(a*t)*C)
     Coefficients (with 95% confidence bounds):
       k =      -269.7  (-288.2, -251.2)
       a =      0.1438  (0.1191, 0.1685)
       C =    -0.05613  (-0.09544, -0.01682)

goodness =

           sse: 394.4838
       rsquare: 0.9955
           dfe: 9
    adjrsquare: 0.9945
          rmse: 6.6205
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
6楼2011-06-02 21:41:09
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

引用回帖:
Originally posted by dbb627 at 2011-06-02 21:41:09:
t= [0 2 7 9 19 22 24 26 28 30 32 40]';
c=[255.55 246.44 237.28 228.36 136.08 114 99.16 82.33 69.4 56.94 42.31 0]';
ft_ = fittype('k/(-1+exp(a*t)*C)',...
    'dependent',{'c'},'independent',{'t'} ...

maple计算解析解为 S(t)=k/(-1+exp(q*214.63*k*t)*C1*k)
令q*214.63*k=a,C1*k=C  S(t)=c
matlab拟合可得a k C
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
7楼2011-06-02 21:48:41
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

【答案】应助回帖

vs570588(金币+3): 谢谢你 2011-06-03 13:26:07
vs570588(金币+3): 十分感谢 2011-06-04 18:33:10
vs570588(金币+1): 只剩下一个,谢谢你了。希望你能再帮我看看 2011-06-05 20:55:16
引用回帖:
Originally posted by dbb627 at 2011-06-02 21:41:09:
t= [0 2 7 9 19 22 24 26 28 30 32 40]';
c=[255.55 246.44 237.28 228.36 136.08 114 99.16 82.33 69.4 56.94 42.31 0]';
ft_ = fittype('k/(-1+exp(a*t)*C)',...
    'dependent',{'c'},'independent',{'t'} ...

计算的图见附件

The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
8楼2011-06-02 21:50:44
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

matlab2010解那个方程有点问题,mupad符号引擎得出的解析解带复数,而用maple算出来就没有问题。
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
11楼2011-06-05 22:24:33
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖

dbb627

荣誉版主 (著名写手)

我仔细看了下,我的程序有点问题,我把方程式看错了,不过为什么数据拟合的还可以就不太清楚。
dsolve('DS=-q*S*X*(k+S)','t')

ans =

                                         0
                                        -k
-(k*(tan(-(k*(C3 - X*q*t)*i)/2) - i)*i)/2
The more you learn, the more you know, the more you know, and the more you forget. The more you forget, the less you know. So why bother to learn.
13楼2011-06-07 16:18:31
已阅   回复此楼   关注TA 给TA发消息 送TA红花 TA的回帖
相关版块跳转 我要订阅楼主 学员BmWXvC 的主题更新
信息提示
请填处理意见