MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   【求助】程序出错 找不出来原因 请大家帮忙 (https://www.labfans.com/bbs/showthread.php?t=1348)

caowenzi 2008-01-30 16:37

【求助】程序出错 找不出来原因 请大家帮忙
 
错误为:
??? Error using ==> mrdivide
Matrix dimensions must agree.

Error in ==> mymean at 13
f(1)=(R0/2*sqrt(C0/L0)+G0/2*sqrt(L0/C0))*(1-1/(8*omga1^2)*(R0/L0-G0/C0)^2)-gbeta1;


出错函数为:
function f=mymean(x)
global omga1 omga2 gbeta1 galpha1 gbeta2 galpha2

R0=x(1);G0=x(2);C0=x(3);L0=x(4);
f(1)=(R0/2*sqrt(C0/L0)+G0/2*sqrt(L0/C0))*(1-1/(8*omga1^2)*(R0/L0-G0/C0)^2)-gbeta1;
f(2)=omga1*sqrt(L0*C0)*(1+1/(8*omga1^2)*(R0/L0-G0/C0)^2)-galpha1;
f(3)=(R0/2*sqrt(C0/L0)+G0/2*sqrt(L0/C0))*(1-1/(8*omga2^2)*(R0/L0-G0/C0)^2)-gbeta2;
f(4)=omga2*sqrt(L0*C0)*(1+1/(8*omga2^2)*(R0/L0-G0/C0)^2)-galpha2;


所有时间均为北京时间。现在的时间是 10:39

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