计算光波由光密入射到光疏介质时相位变化
~!5Qb{^ O9By5j 4 clear
.4"BN<9 u4xtlGt5 close all
zw+wq+2" X=m^+%iD n1=1.45,n2=1;
!<~.>5UQ ^1Fzs(#. theta=0:0.1:90;
8[X"XThj
WZ,k][~ a=theta*pi/180;
}F.k,2 ;DnUeE8 rp=(n2*cos(a)-n1*sqrt(1-(n1/n2*sin(a)).^2))./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
Os>&:{D 4! Et}%)M rs=(n1*cos(a)-n2*sqrt(1-(n1/n2*sin(a)).^2))./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
!=,zy >/4[OPB0R tp=2*n1*cos(a)./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
52o^] 9RJ#zUK ts=2*n1*cos(a)./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
`G:1 NV/paoyx:* arp=angle(rp);
\Q}Y"oq rWNe&gFM ars=angle(rs);
)O+Zbn ?d?.&nt atp=angle(tp);
~ PyS;L} 9fbbJ"I+ ats=angle(ts);
'#=n> 1@'I eywg figure(1)
+(:Qf+: S`b!sT-sD subplot(1,2,1);
s Adb0 A J^#g?RHN>m plot(theta,arp,'-',theta,ars,'--','LineWidth',2)
2eRk_j] i qxMTH#! legend('arg(r_p)','arg(r_s)')
nJv=kk1|o
2<8l&2}7] xlabel('\theta_i')
~e,l2
< vdUKIP
=|_ ylabel('\phi')
5cA:;{z];g R%2.N!8v title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
2o[ceEg w]h8KNt axis([0 90 -3.5 3.5])
32aI0CT !9r%d8!z grid on
fH9"sBiO xuqG)HthRS subplot(1,2,2);
#M!{D A+H8\ew2, plot(theta,atp,'-',theta,ats,'--','LineWidth',2)
E%8uQ2p( eG2'W legend('arg(t_p)','arg(t_s)')
8"d??3ZXJ Z 369< xlabel('\theta_i')
W<^t2 j' #>G:6'r ylabel('\phi')
PvW4%A@0 ~bzac2Rp title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
^gyI-S(; tG9C(D`G axis([0 90 -3.5 3.5])
=)jo}MB QH7 GEj] grid on
S"^'ksL\
}#&[[}@th