查看单个帖子
旧 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 当前离线   回复时引用此帖