| 查看: 262 | 回复: 1 | |||
| 当前主题已经存档。 | |||
| 【有奖交流】积极回复本帖子,参与交流,就有机会分得作者 flying_23 的 20 个金币 | |||
[交流]
【求助】非线性拟合
|
|||
|
条件t=[0.0100 0.6800 1.1000 1.6300 2.0700 2.6700 3.0900 3.6400 4.6500 5.1000 5.5800 6.1100 6.6300 7.0600 7.6200 8.6600 9.0400 9.6300]; y=[2.3291 3.8513 4.5009 6.7492 9.1121 9.6917 11.1693 10.9145 16.4428 18.2962 21.6399 25.7861 26.3428 26.5058 27.6395 35.0276 35.5562 36.1039]; 方程Dy=-k*y*z+0.095*b*z , Dz=-b*z-0.222*z, y(0)=0, z(0)=5300 z只知道初始值,过程值无法测定,要求通过方程拟合得出k和b的值 通过[y,z]=dsolve('Dy=-k*y*z+0.995*b*z','Dz=-b*z-0.222*z','y(0)=0,z(0)=5300','t')得出y的表达式, y = (199/200*b/k*exp(-2650000*k/(500*b+111)*exp(-1/500*(500*b+111)*t))-199/200*b/exp(5300*k/(500*b+111))^500/k)*exp(2650000*k/(500*b+111)*exp(-1/500*(500*b+111)*t)) z =5300*exp((-b-111/500)*t) 然后 myfunc=inline('(199./200.*beta(2)./beta(1).*exp(-2650000.*beta(1)./(500.*beta(2)+111).*exp(-1./500*(500.*beta(2)+111).*t))-199./200.*beta(2)./exp(5300.*beta(1)/(500.*beta(2)+111)).^500/beta(1)).*exp(2650000.*beta(1)/(500.*beta(2)+111).*exp(-1./500*(500.*beta(2)+111).*t))','beta','t') 采用nlinfit拟合 beta=nlinfit(t,y,myfunc,[0.1 0.1]) 出现以下错误 ??? Error using ==> nlinfit>checkFunVals at 357 MODELFUN has returned Inf or NaN values. Error in ==> nlinfit>LMfit at 304 if funValCheck && ~isfinite(sse), checkFunVals(r); end Error in ==> nlinfit at 167 [beta,J,lsiter,cause] = LMfit(X,y, model,beta,options,verbose,maxiter); 请各位帮忙解决一下这个问题,非常急切需要 |
» 猜你喜欢
面上项目filecode邪修
已经有6人回复
应该是93bebmhtak前后十一个字符比较关键
已经有14人回复
2026国自然放榜时间
已经有4人回复
关于代码变化问题,想知道的进来
已经有22人回复
这样的filecode谁见过
已经有21人回复
filecode与中标关系的预测
已经有5人回复
fileCode有新解读?
已经有18人回复
关于filecode,很负责任的告诉大家
已经有7人回复
【2027博士申请】纳米药物递送方向
已经有5人回复
关于豆爷回答的JTJC与%2F数量
已经有7人回复
2楼2009-10-24 05:56:21










回复此楼
20