计算光波由光密入射到光疏介质时相位变化
|| p>O q>X30g clear
]2zzY::Sd= dd?ZQ:n close all
<GdQ""X )By#({O n1=1.45,n2=1;
0NB5YQ8_] n]nb+_-97 theta=0:0.1:90;
9nGS"E l{ i>elK<R4 a=theta*pi/180;
VbU*&{j {OIktG2gZ rp=(n2*cos(a)-n1*sqrt(1-(n1/n2*sin(a)).^2))./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
s?j || [B_(,/? rs=(n1*cos(a)-n2*sqrt(1-(n1/n2*sin(a)).^2))./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
au+6ookT wC&+nS1 tp=2*n1*cos(a)./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
1r:i'cWh mMt~4(5 ts=2*n1*cos(a)./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
+uqP:z =6YffXa_s arp=angle(rp);
;o#wK>pk%M +.3,(l ars=angle(rs);
=NNA7E7c ,qUOPW?= atp=angle(tp);
}LA7ku 1EmZ/@k/Y ats=angle(ts);
6s<w}O y+aL5$x6 figure(1)
_~}n(?> iJaA&z5sr subplot(1,2,1);
^`*p;&(K\^ Kk9eJ\ plot(theta,arp,'-',theta,ars,'--','LineWidth',2)
e0e3b] x2M{=MExE. legend('arg(r_p)','arg(r_s)')
yN/Uyhq dN)@/R^E; xlabel('\theta_i')
zNh$d;(O$^ H_&z-g` ylabel('\phi')
UmNh0nS }"\jB title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
$T2n^yz S(NUuu}S axis([0 90 -3.5 3.5])
w+Oo-AGNH gPf^dGi7t grid on
8]2j*e0xV ~i5t1 subplot(1,2,2);
d>bS) ,\CG}-v@CN plot(theta,atp,'-',theta,ats,'--','LineWidth',2)
p+.{"% Kc#42C;t/ legend('arg(t_p)','arg(t_s)')
y&(R1Y75 _[p@V_my xlabel('\theta_i')
JANP_b:t O8<@+xlX ylabel('\phi')
~'u %66 #- z(]Y,y title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
$g @-WNe 8 aC]" C axis([0 90 -3.5 3.5])
l
]CnLqf& Fq`wx grid on
zKf.jpF^ \?K>~{)