计算光波由光密入射到光疏介质时相位变化
hp>me*vzr @]2cL clear
kkzXv`+ FEdyh?$ close all
d]@9kG $1?YVA7 n1=1.45,n2=1;
E)Hp. F,lQj7 theta=0:0.1:90;
> }:6m y<;#*wB a=theta*pi/180;
lJU[9)Q_ '4O1Y0K rp=(n2*cos(a)-n1*sqrt(1-(n1/n2*sin(a)).^2))./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
V}aXS;(r% i<@|+*>M rs=(n1*cos(a)-n2*sqrt(1-(n1/n2*sin(a)).^2))./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
^8fO3<Jg >+$1 p_ tp=2*n1*cos(a)./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
C w$y kB :")$ ts=2*n1*cos(a)./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
e@I?ESZ5 fY-{,+ `' arp=angle(rp);
I[F.M}5:z RS$:]hxd>_ ars=angle(rs);
,:;_j<g`e gbSZ-
ej atp=angle(tp);
x$A5Ved HPt" ats=angle(ts);
Xw![}L> *_^AK=i figure(1)
Hi|Oeu .e]!i(5I subplot(1,2,1);
`aSz"4Wd LiN{^g^fx plot(theta,arp,'-',theta,ars,'--','LineWidth',2)
A\ LTAp(I /Wzic+v<> legend('arg(r_p)','arg(r_s)')
Va
!HcG1^: J6f;dF^ xlabel('\theta_i')
.}z&$:U9[ .Mm8\]. ylabel('\phi')
67J=#%\ B)Gm"bLCOZ title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
;AHa|35\ lRentNg0b axis([0 90 -3.5 3.5])
Kk#8r+, B:SzCC.B grid on
o&X!75^G> Y&+<'FA subplot(1,2,2);
Q6DE|qnV
lN^L#m*@ plot(theta,atp,'-',theta,ats,'--','LineWidth',2)
W\X51DrEx P$w0.XZa legend('arg(t_p)','arg(t_s)')
JQ0KXS Nr f?
ko%c_p xlabel('\theta_i')
3Vt-]DGX tn:9 ylabel('\phi')
0y6nMI b-~Gt]%>m title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
C}W/9_I6Uo }Z%*gfp axis([0 90 -3.5 3.5])
LN_6>u D'A)H grid on
L5PN]<~T Xhi9\wteYw