计算光波由光密入射到光疏介质时相位变化
\$]
V#@F }+4^ZbX+: clear
kxp, ZP J` J^C close all
xVn"xk aOH$}QnS n1=1.45,n2=1;
EgT2a Q(\U'|%J theta=0:0.1:90;
SsE8;IGH *6trK`tx^ a=theta*pi/180;
]d|:&h R|Lr@k{6+r rp=(n2*cos(a)-n1*sqrt(1-(n1/n2*sin(a)).^2))./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
DL0i toCxY+"nbU rs=(n1*cos(a)-n2*sqrt(1-(n1/n2*sin(a)).^2))./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
=6sL}$ ,>rr|O tp=2*n1*cos(a)./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
"A6T'nOP ?4 fXCb]7 ts=2*n1*cos(a)./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
D+ )R_ Qwm#6{5 arp=angle(rp);
l"#}g%E :7w^2/ZGo ars=angle(rs);
}Ra'`;D$ &(]@L\A atp=angle(tp);
A1A/OU<Vb y,D4b6 ats=angle(ts);
)Uv lEG'] $\
0d9^)& figure(1)
8 N5ga o`8dqP subplot(1,2,1);
R\B-cU[, ` 5.PPI\h2 plot(theta,arp,'-',theta,ars,'--','LineWidth',2)
dDAIfe2y "|6#n34 legend('arg(r_p)','arg(r_s)')
8RfFP\ AP T7!"gJ xlabel('\theta_i')
f;u<r? >Z .1[[Y} ylabel('\phi')
8Q%rBl. _ZnVQ,zY title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
$~[k?D Tjfg[Z/x axis([0 90 -3.5 3.5])
8$H_:*A? FOFZ/q grid on
d&dp#)._8 -xc*R%k subplot(1,2,2);
Aqwjs
3 5f:Mb|.? plot(theta,atp,'-',theta,ats,'--','LineWidth',2)
BixKK$Lo CO`%eL~ legend('arg(t_p)','arg(t_s)')
2&f]v`|M| VZ`L-P$AF xlabel('\theta_i')
OKo39 A\fu yj6o533o ylabel('\phi')
3=reN6Q {g:I5
A# title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
;<JyA3i^V, bvf}r
,`Q7 axis([0 90 -3.5 3.5])
&:i|;^^2 *vL2n>HH grid on
Fo=hL vgc#IEx@