查看单个帖子
旧 2008-05-01, 21:41   #1
hsmyy
初级会员
 
注册日期: 2008-05-01
年龄: 37
帖子: 1
声望力: 0
hsmyy 正向着好的方向发展
默认 [求助]nlinfit问题,求助

我的程序如下:
wcdma = [1000,1626,3300,4000,5000,6100,12700,16000,23400];
wx = [4.75,5,5.75,6,6.16,6.5,7.5,7.92,8.4];

myfun = inline('A(2) / (1 + (A(2) / A(1) -1)* exp(A(3) * t ))','t','A');

A = nlinfit(wx,wcdma,myfun,[ 0 ,0 ,0 ]);

a = A(1);

b = A(2);

c = A(3);


错误为:

??? Error using ==> nlinfit at 114
The inline model function generated the following error:
Error using ==> inlineeval at 15
Error in inline expression ==> A(2) / (1 + (A(2) / A(1) -1)* exp(A(3)
* t ))
??? Error using ==> mrdivide
Matrix dimensions must agree.

Error in ==> r6 at 6
A = nlinfit(wx,wcdma,myfun,[ 0 ,0 ,0 ]);

但我不知道错误的原因……求教啊!
hsmyy 当前离线   回复时引用此帖