计算光波由光密入射到光疏介质时相位变化
Egg=yF>T Ya3C#= clear
/5(Yy}
TQpf Q close all
p@xf^[50k gOSJM1Mr3 n1=1.45,n2=1;
jB%lB1Q| Qz5sxi theta=0:0.1:90;
ILEz;D{] p<2L.\6" a=theta*pi/180;
QbkLdM,S* hT`J1nNt rp=(n2*cos(a)-n1*sqrt(1-(n1/n2*sin(a)).^2))./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
v+46QK|I& ;z}i-cNae rs=(n1*cos(a)-n2*sqrt(1-(n1/n2*sin(a)).^2))./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
,(qRc(Ho }wr{W:j tp=2*n1*cos(a)./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
k/#&qC>] _(%d(E2? ts=2*n1*cos(a)./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
hYPl&^ ObVGV arp=angle(rp);
Wbr|_W 8xMEe:}V ars=angle(rs);
n}F&1Z U>=Z-
T atp=angle(tp);
*W,]>v0%T Ugu[|, ats=angle(ts);
y{ibO}s $WyD^|~SF figure(1)
1+szG1U= \?[v{WP) subplot(1,2,1);
O#:$^#j& @XLy7_} plot(theta,arp,'-',theta,ars,'--','LineWidth',2)
^Cu\VV <*16(!k0 legend('arg(r_p)','arg(r_s)')
^t` k0< -+(jq>t xlabel('\theta_i')
I4/8 _)b^ "-e
\p lKj ylabel('\phi')
;X?}x%$ N60rgSzI title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
s)noo 8ja$g, axis([0 90 -3.5 3.5])
sF!($k;! Sg&UagBj grid on
"?]{%-u PDJr<E? subplot(1,2,2);
Gw>^[dmt! 77C'*tt1] plot(theta,atp,'-',theta,ats,'--','LineWidth',2)
Vq2y4D? -~s!73pDY legend('arg(t_p)','arg(t_s)')
]op}y0 ?5C!<3gM) xlabel('\theta_i')
rID#`:Hl-| HJLu'KY} ylabel('\phi')
Lm*e5JnV m? eiIrMW title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
G,?hp>lj {G U&a axis([0 90 -3.5 3.5])
',Y.v"']4 Dd'm U grid on
5's87Z;6 ![`Ay4AZ@a