计算光波由光密入射到光疏介质时相位变化
vbn>mg5 aW@oE
~` clear
aii'}c t&"5dM\ close all
%\yK5V5 ;?8Iys# n1=1.45,n2=1;
%vc'{`P kukaim>K theta=0:0.1:90;
lCE2SKj
apaIJ+^[ a=theta*pi/180;
NS5 49S ` Xqy rp=(n2*cos(a)-n1*sqrt(1-(n1/n2*sin(a)).^2))./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
3"B+xbe= dP3VJ3+
% rs=(n1*cos(a)-n2*sqrt(1-(n1/n2*sin(a)).^2))./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
em/Xu nCB[4 tp=2*n1*cos(a)./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
bBFwx @
ok=40B99T ts=2*n1*cos(a)./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
g _x\T+= %o-jwr}O{ arp=angle(rp);
Dtt\~m;AR eu=|t&FKk ars=angle(rs);
)x9]xqoR RhyegD atp=angle(tp);
7rPLnB] }9FD/ ats=angle(ts);
iGyVG41U 5#BF,-Jv figure(1)
<M`-`v6H >T(M0Tkt subplot(1,2,1);
] :GfOgo C,R,:zR plot(theta,arp,'-',theta,ars,'--','LineWidth',2)
&F86SrsI e8 v; D legend('arg(r_p)','arg(r_s)')
,$o-C&nC I_K[!4~Kn xlabel('\theta_i')
I S.F Za34/ro/T ylabel('\phi')
*j/uihY E#8J+7 title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
5~*=#v:` b,zR5R^D; axis([0 90 -3.5 3.5])
h#v L5At 'o7R/`4KR grid on
(=6P]~, u2f `|+1^y subplot(1,2,2);
a"MTQFm' `6dy
U_f plot(theta,atp,'-',theta,ats,'--','LineWidth',2)
ngtuYASc ojiM2QT}m legend('arg(t_p)','arg(t_s)')
3AX?B~s 2K5}3<KD/ xlabel('\theta_i')
QxP` f KC8 Oz_b3r ylabel('\phi')
:zRB)hd *'kC8ZR5 title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
cYBrRTrI# O8!!UA8V axis([0 90 -3.5 3.5])
^xBb$ Ubn grid on
37.)@ ]W89.><%14