计算光波由光密入射到光疏介质时相位变化
]Ea-MeH t
U}6^yc clear
1j<uFhi> , >aa2 close all
jyD~ER}J Ma! n1=1.45,n2=1;
dC,C[7\ nA0%M1a theta=0:0.1:90;
%%ouf06.| %Bw:6Y4LZ a=theta*pi/180;
JPF6zzl) g8cBb5(L rp=(n2*cos(a)-n1*sqrt(1-(n1/n2*sin(a)).^2))./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
/4O))}TX /=YNkw5 rs=(n1*cos(a)-n2*sqrt(1-(n1/n2*sin(a)).^2))./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
zG$5g^J
!p$p 7 tp=2*n1*cos(a)./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
w71YA#cg c2NB@T9'v ts=2*n1*cos(a)./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
gy@=)R/~ CNb(\] arp=angle(rp);
^mn!;nu W`PJflr| ars=angle(rs);
i.'"`pn_ 4Q0ZY(2 EO atp=angle(tp);
^R:&c;&, w:lj4Z_ ats=angle(ts);
>3p~>;9sc pl%!AY'oE> figure(1)
l<XYDb~op T/E=?kBR subplot(1,2,1);
e_e\Ie/pDc M~\dvJ$cH plot(theta,arp,'-',theta,ars,'--','LineWidth',2)
Y_Fn)( $ (;:4 legend('arg(r_p)','arg(r_s)')
"x R6~8 A:ts_* xlabel('\theta_i')
pMT7 /y- ~-Kx^3(# ylabel('\phi')
27 XM&ZrZ fD@d.8nXd title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
K@*+;6y@ `bBkPH}M axis([0 90 -3.5 3.5])
D2}^TIg +r'&6Me! grid on
b9rQQS ;&<N1 subplot(1,2,2);
W6T4Zsg Jy/<
{7j plot(theta,atp,'-',theta,ats,'--','LineWidth',2)
@*|VWHR iO?AY legend('arg(t_p)','arg(t_s)')
<qfAW?tF 27N;> xlabel('\theta_i')
]fzXrN_ qK7:[\T|?T ylabel('\phi')
%d];h Z@1kx3Wx$ title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
UB5H8&Rf! -_n Qn axis([0 90 -3.5 3.5])
f$QkzWvr <&Xl b0 grid on
n[0u&m8 xgMh@@e