计算光波由光密入射到光疏介质时相位变化
(gP)% h"X;3b^ m clear
QRHu3w >/l? g5{ close all
f .Q\Z'S^ S2HcG
1J
n1=1.45,n2=1;
@
[:ZS+1 s}w{:Hk,x8 theta=0:0.1:90;
F*IzQ(#HW CyS$|E a=theta*pi/180;
;LcZ`1 ,:%CB"J rp=(n2*cos(a)-n1*sqrt(1-(n1/n2*sin(a)).^2))./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
]A~WIF t{ xf:~B rs=(n1*cos(a)-n2*sqrt(1-(n1/n2*sin(a)).^2))./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
rDm~h~u5 ^E;kgED5 tp=2*n1*cos(a)./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
K"|l@Q[ 4!Fo$9 ts=2*n1*cos(a)./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
'@o;-'b idLWe9gC arp=angle(rp);
- Ajo9H tr<Nm6! ars=angle(rs);
iW$_zgN J\+0[~~ atp=angle(tp);
((H^2KJn zZL6z4g ats=angle(ts);
'GNK "XA^ kVkU)hqR figure(1)
3O,+=?VK \H1(PA subplot(1,2,1);
!hJ+Lp_ J l(&!?j plot(theta,arp,'-',theta,ars,'--','LineWidth',2)
'~5LY!H(pT r+A{JHnN legend('arg(r_p)','arg(r_s)')
dG@%jD) \:b3~%Fz xlabel('\theta_i')
dMh:ulIY> ,)0H3t ylabel('\phi')
;Y00TGU sd*p/Q|4 title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
h}[-'>{ ]OM"ZG/^ axis([0 90 -3.5 3.5])
e^8 O_VB
SWH2 grid on
L{X_^ ]] !VK subplot(1,2,2);
,|3MG",@@h F^WP <0C plot(theta,atp,'-',theta,ats,'--','LineWidth',2)
&-;4.op PRx8I
. legend('arg(t_p)','arg(t_s)')
+9M^7/}H K*%9)hq xlabel('\theta_i')
WA5 kg\ bp*
^z,w ylabel('\phi')
BBaQ}{F8>2 t>L;kRujVJ title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
R cAwrsd "i
nd$Z`c axis([0 90 -3.5 3.5])
5&QJ7B,! B-xGX$<z grid on
.k#U]M
$|L
Sx