hsmyy
2008-05-01, 21:41
我的程序如下:
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 ]);
但我不知道错误的原因……求教啊!
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 ]);
但我不知道错误的原因……求教啊!