精选优质文档-倾情为你奉上n0=1;%n0为空气折射率a0=0;%初始入射角为0,即正入射n1=1.444;n2=1.7514;d1=3.4886;d2=4.6373;d=1.55;p1=2*pi*n1*d1/d;p2=2*pi*n2*d2/d;u0=4*pi*1e-7;%真空磁导率e0=1e-9/(36*pi);%真空介电常数b=sqrt(e0/u0);c1=b*n1;%波阻抗c2=b*n2;c0=b*n0;c00=b*n0;A1=cos(p1);B1=-i*sin(p1)/c1;C1=-i*c1*sin(p1);D1=cos(p1);M1=A1 B1;C1 D1;%介质1的传输矩阵A2=cos(p2);B2=-i*sin(p2)/c2;C2=-i*c2*sin(p2);D2=cos(p2);M2=A2 B2;C2 D2;%介质2的传输矩阵M=M1*M2;%两个介质层的总传输矩阵A=M(1,1);B=M(1,2);C=M(2,1);D=M(2,2);r=(A*c0+B*c0*c