clc
clear
close all
n1=3.45;n2=3.43;lamda=1.15e-6;k0=2*pi/lamda;
for m=0:5
b=0:0.001e-6:10e-6;
v1=(m+1)^2*pi^2;
v2=n1^2-n2^2;
v3=n2^2/n1^2;
N=sqrt(abs(n1.^2-(v1./(k0.*b+2.*v3./sqrt(v2))).^2));
plot(b,N)
axis([0 10e-6 3.430 3.450])
xlabel('b/\mum')
ylabel('N')
title('TE模有效折射率N与波导芯厚度b的关系曲线')
hold on
end
按上面语句试试