MATLAB爱好者论坛-LabFans.com

MATLAB爱好者论坛-LabFans.com (https://www.labfans.com/bbs/index.php)
-   MATLAB论坛 (https://www.labfans.com/bbs/forumdisplay.php?f=6)
-   -   [MATLAB基础] 请教一个编程 (https://www.labfans.com/bbs/showthread.php?t=11680)

demonching 2010-06-02 12:52

请教一个编程
 
我按有效媒质理论extended MG公式
编写一个程序如下:
miuh=1;mius=1;epsilonh=3;epsilons=6.8+0.01*i;f=0.3;r=120;lambda=600:0.01:700;
x=2*pi.*r.*abs(sqrt(epsilonh.*miuh))./lambda;
xs=2*pi.*r.*abs(sqrt(epsilons.*mius))./lambda;
j0x=sin(x)./x;
j0xs=sin(xs)./xs;
y0x=-cos(x)./x;
h0x=j0x+i*y0x;
j1x=sin(x)./x.^2-cos(x)./x;
j1xs=sin(xs)./xs.^2-cos(xs)./xs;
y1x=-cos(x)./x.^2-sin(x)./x;
h1x=j1x+i*y1x;
t1=x.*j0x-j1x;
t2=xs.*j0xs-j1xs;
t3=x.*h0x-h1x;
TIE=(j1xs.*t1.*epsilons-j1x.*t2.*epsilonh)/(h1x.*t2.*epsilonh-j1xs.*t3.*epsilons);
TIH=(j1xs.*t1.*mius-j1x.*t2.*miuh)/(h1x.*t2.*miuh-j1xs.*t3.*mius);
epsiloneff=epsilonh.*(x.^3-3*i*f.*TIE)/(x.^3+3/2*i*f.*TIE);
miueff=miuh.*(x.^3-3*i*f.*TIH)/(x.^3+3/2*i*f.*TIH);
plot(lambda,epsiloneff,'r')
plot(lambda,miueff,'g')
运行以后为什么图像只有一条直线?请高手指教!谢谢。


所有时间均为北京时间。现在的时间是 12:34

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