计算光波由光密入射到光疏介质时相位变化
y?
(2U6c 3#kitmV clear
96Wp!]* J<n+\F-s close all
iP~,n8W or ;f&![w n1=1.45,n2=1;
t6N*6ld2b .]4W!])9 theta=0:0.1:90;
jZfx Jm J<j&;:IRd a=theta*pi/180;
<g8K})P 3.
WF}8 rp=(n2*cos(a)-n1*sqrt(1-(n1/n2*sin(a)).^2))./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
.~lKBkS`! u9-nt}hGYM rs=(n1*cos(a)-n2*sqrt(1-(n1/n2*sin(a)).^2))./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
Tn-C>=tR~% yTM{|D]$( tp=2*n1*cos(a)./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
J a,d3K
EEy$w1ec ts=2*n1*cos(a)./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
$.6K!x{( 9W*+SlH@! arp=angle(rp);
Y[ reD Weoj|0|t ars=angle(rs);
H( -Y EER`?Sa( atp=angle(tp);
UO`;&e-DB %rQuBi# 1f ats=angle(ts);
gv15t'y9 B=L&bx figure(1)
N8cAqr *TW=/+j subplot(1,2,1);
}Y(]6$uS G%p~m%zIK plot(theta,arp,'-',theta,ars,'--','LineWidth',2)
#(Or|\t qMBR *f legend('arg(r_p)','arg(r_s)')
]36sZ
* }S-DB#6 xlabel('\theta_i')
=tTqN+4 z(uZF3 ylabel('\phi')
UCrh/b Tm W|k0R4K]] title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
%WG9 dYdS .ujT!{>v/ axis([0 90 -3.5 3.5])
`?\tUO2_T /76 1o\Q grid on
3
vP(SIF Hk_y/97OO subplot(1,2,2);
C) QKPT 3Rg}+[b
plot(theta,atp,'-',theta,ats,'--','LineWidth',2)
t-u|U(n YO{GU7 legend('arg(t_p)','arg(t_s)')
1xNVdI h.rD}N\L xlabel('\theta_i')
? Q@kg ub0zJTFJ# ylabel('\phi')
YIt9M,5/Q 5lKJll^2: title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
2s*#u<I h)lPi axis([0 90 -3.5 3.5])
gIWrlIV{9 wmNHT _ grid on
vP%tk s+. "\"DCDKmG