计算光波由光密入射到光疏介质时相位变化
+( 7vmC. 9 u89P clear
;iI2K/ 3 FQ&VM6_ close all
.cK WQ`P^5e n1=1.45,n2=1;
*m Tc4&* o~N-x* theta=0:0.1:90;
F>{uB!!L4 |&*rSp2iH a=theta*pi/180;
#Y b9w3N ~x#-#nuh" rp=(n2*cos(a)-n1*sqrt(1-(n1/n2*sin(a)).^2))./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
<^$b1<@ {.'g!{SHp rs=(n1*cos(a)-n2*sqrt(1-(n1/n2*sin(a)).^2))./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
c^UM(bW xg!\C@$ tp=2*n1*cos(a)./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
3gXUfv2ID E )SOcM) ts=2*n1*cos(a)./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
6m<9^NT KUV{]?' arp=angle(rp);
_'v )Fy F#9KMu<<cI ars=angle(rs);
}{PtQc6RL! Eu_0n6J atp=angle(tp);
jh!IOtf N^j''siB ats=angle(ts);
M4]|(A 438>)= figure(1)
a.ME{:a% Cf 8-% subplot(1,2,1);
?AH<y/i<Y +PD5pr plot(theta,arp,'-',theta,ars,'--','LineWidth',2)
P=i |{vv( JIkmtZv legend('arg(r_p)','arg(r_s)')
G4]`` 6!V* :.( xlabel('\theta_i')
2 z l X*;p;N ylabel('\phi')
RozsRt;i !S<~(Ujyw title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
7~g0{W>Zm XBBRB<l) axis([0 90 -3.5 3.5])
p#I1l2nE hYx^D>}]
grid on
=swcmab; <i?-x&Q?= subplot(1,2,2);
nP
/$uj ?q6eV~P plot(theta,atp,'-',theta,ats,'--','LineWidth',2)
8BdeqgU/_ }gt~{9?c legend('arg(t_p)','arg(t_s)')
L 32ki}2 &}?e:PEy xlabel('\theta_i')
11'Tt! J)+eEmrU ylabel('\phi')
sRG3`>1 mI18A#[ 3 title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
a+Nd%hoe EZFWxR/ axis([0 90 -3.5 3.5])
hWJc
A.A
p5hP}Z4r grid on
8t"DQ Y-R h Nwb.[