Labfans是一个针对大学生、工程师和科研工作者的技术社区。 论坛首页 | 联系我们(Contact Us)
MATLAB爱好者论坛-LabFans.com
返回   MATLAB爱好者论坛-LabFans.com > 工程数学软件 > MATLAB论坛
MATLAB论坛 一切MATLAB相关问题在此讨论。
 
 
主题工具 显示模式
旧 2010-05-31, 16:34   #1
azure_blue
初级会员
 
注册日期: 2010-05-31
年龄: 34
帖子: 3
声望力: 0
azure_blue 正向着好的方向发展
眨眼 求助:如何确定自定义函数拟合时的参数初值?感谢!

我做一个人口增长的拟合,在确定参数初值时遇到了严重的麻烦,求高手给与帮助!!!万分感谢!!!
以下是我写的程序:

>> t=[1790:10:2000];

>> population=[3.9 5.3 7.2 9.6 12.9 17.1 23.2 31.4 38.6 50.2 62.9 76.0 92.0 106.5 123.2 131.7 150.7 179.3 204.0 226.5 251.4 281.4];

>> ft=inline('a(1).*a(2)./(a(1)+exp(-a(3).*t).*a(2)-exp(-a(3).*t).*a(1))','a','t');

>> a=nlinfit(t,population,ft,[1 1 1])

Warning: Rank deficient, rank = 1, tol = 2.6167e-014.
> In nlinfit>LMfit at 296
In nlinfit at 168

Warning: Rank deficient, rank = 1, tol = 2.6050e-014.
> In nlinfit>LMfit at 296
In nlinfit at 168

Warning: Rank deficient, rank = 1, tol = 2.6038e-014.
> In nlinfit>LMfit at 296
In nlinfit at 168

Warning: The Jacobian at the solution is ill-conditioned, and some
model parameters may not be estimated well (they are not identifiable).
Use caution in making predictions.
> In nlinfit at 225
a =
1.0000 94.7727 1.0000

当然[1 1 1]是我瞎写的,显然最后的结果不对啊!但到底应该是什么呢?怎么确定?:handshake
azure_blue 当前离线   回复时引用此帖
 


发帖规则
不可以发表新主题
不可以发表回复
不可以上传附件
不可以编辑自己的帖子

启用 BB 代码
论坛启用 表情符号
论坛启用 [IMG] 代码
论坛禁用 HTML 代码



所有时间均为北京时间。现在的时间是 03:44


Powered by vBulletin
版权所有 ©2000 - 2025,Jelsoft Enterprises Ltd.