www.pudn.com > waveguide.zip > waveguide.m, change:2016-11-09,size:863b


%不同波导芯厚度h对应的TE模式也TM模式色散图程序 
 
k0=2*pi/1.55; 
 
for m=0:1:3 
n1=1.530;%TE模式下的折射率分布 
n2=1.444; 
%n3=1.51; 
N1=1.510:0.0001:1.537;%TE模式下有效折射率的范围 
h_te=(m*pi.*ones()+2*atan(((N1.^2-n2.^2)./(n1.^2-N1.^2)).^0.5))./(k0.*(n1.^2-N1.^2).^0.5);%TE模式下波导芯厚度 
 
n1=1.530;%TM模式下的折射率分布 
n2=1.444; 
%n3=1.5095; 
N2=1.5095:0.0001:1.530;%TM模式下有效折射率的范围 
h_tm=(m*pi.*ones()+2*atan((((N2.^2-n2.^2)./(n1.^2-N2.^2)).^0.5).*n1.^2./n2.^2))./(k0.*(n1.^2-N2.^2).^0.5);%TM模式下波导芯厚度 
title('色散曲线') 
plot(h_te,N1,'-b',h_tm,N2,'-r') 
hold on 
axis([0,15,1.509,1.530]) 
%axis auto 
legend('TE','TM','Location','Northwest') 
xlabel('波导芯厚度2a(um)','fontsize',10) 
ylabel('有效折射率N','fontsize',10) 
text(3,1.523,'m=0') 
text(6,1.520,'m=1') 
text(9,1.517,'m=2') 
text(10,1.510,'m=3') 
grid on 
%grid minor 
end