计算光波由光密入射到光疏介质时相位变化
uLD%M av ZZL.&Ho clear
:EJ+# R*`A',]:9 close all
(|(#~o]40t 2j9Mr n1=1.45,n2=1;
aze}koNE f
wWI2"} theta=0:0.1:90;
2>80Qp!xO R3`!Xj#&M a=theta*pi/180;
]x8^s D4g$x' rp=(n2*cos(a)-n1*sqrt(1-(n1/n2*sin(a)).^2))./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
.E-)R rK;F]ei rs=(n1*cos(a)-n2*sqrt(1-(n1/n2*sin(a)).^2))./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
R#eY@N}\ w[~O@:`]<o tp=2*n1*cos(a)./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
_&_#uV<WG0 R#.FfWTZ ts=2*n1*cos(a)./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
?xu5/r< )R.y>Ucb0 arp=angle(rp);
{x{e?c! {s&6C- ars=angle(rs);
@iWql*K;m 8x#SpDI atp=angle(tp);
_]E H~; ^"WrE(3 ats=angle(ts);
p0U4#dD6 NI_.wB{ figure(1)
Ea#wtow|- \_;zm+ <{ subplot(1,2,1);
?s/]k#H %;$zR} plot(theta,arp,'-',theta,ars,'--','LineWidth',2)
%g1:yx K;Qlg{v legend('arg(r_p)','arg(r_s)')
lArYlR} T{-<G13 xlabel('\theta_i')
2x%Xx3! &~Qi+b0! ylabel('\phi')
FMMQO,BU oKjQ?
4 title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
?*lpu <RH2G axis([0 90 -3.5 3.5])
0IO#h{t u
hW@
Y+ grid on
YBb%D -8H0f-1 subplot(1,2,2);
\@8j&],dl *\ZK(/V plot(theta,atp,'-',theta,ats,'--','LineWidth',2)
3~v'Ev VX#4Gh,~N legend('arg(t_p)','arg(t_s)')
z2p@d1 7@iyO7U xlabel('\theta_i')
d(!W }j9V0`Q ylabel('\phi')
?[{_*qh yU'Fyul title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
}Fy~DsQ +
q@kRQY;n axis([0 90 -3.5 3.5])
%6c[\ubr 9,8}4Y=GVI grid on
X;`XkOjk $]O;D~