数学建模社区-数学中国

标题: nlinfit 的错误,求解答 [打印本页]

作者: hsmyy198712    时间: 2008-5-1 21:32
标题: 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 ]);

不知道有没有高人帮我解答……





欢迎光临 数学建模社区-数学中国 (http://www.madio.net/) Powered by Discuz! X2.5