计算光波由光密入射到光疏介质时相位变化
JRl8S ZtB0:'o; clear
N*@bJ*0 s7&%_!4 close all
a0AIq44 FJ#V"|} n1=1.45,n2=1;
qQVqS7 t 5"@<7/2qI theta=0:0.1:90;
2Ie50U Hm4lR{A
a=theta*pi/180;
q9!5J2P EB>laZy> rp=(n2*cos(a)-n1*sqrt(1-(n1/n2*sin(a)).^2))./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
Pyk~V)~M y.mojx%?a rs=(n1*cos(a)-n2*sqrt(1-(n1/n2*sin(a)).^2))./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
KnU "49 e6{/e+/R tp=2*n1*cos(a)./(n2*cos(a)+n1*sqrt(1-(n1/n2*sin(a)).^2));
fzSZ>I0R %_A1WC ts=2*n1*cos(a)./(n1*cos(a)+n2*sqrt(1-(n1/n2*sin(a)).^2));
S
_# UEf /&ph-4\i arp=angle(rp);
E%+V\ W% rLP4l~V ars=angle(rs);
]>:%:-d6 J!S3pS5j atp=angle(tp);
0Z9jlwcQ pz-`Tp w ats=angle(ts);
l`,`N+FG !%5{jO1 figure(1)
}V9146 d9sgk3K subplot(1,2,1);
<2,@rYe/ ztb2Ign< plot(theta,arp,'-',theta,ars,'--','LineWidth',2)
J'2R-CI, VX;u54hS legend('arg(r_p)','arg(r_s)')
yP[GU| >(
i 0L7`TB xlabel('\theta_i')
8f29Hj+ )\^%w9h ylabel('\phi')
5%G++oLXf I] title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
&I d^n 6x -PGq axis([0 90 -3.5 3.5])
#=$4U!yL r$0=b
- grid on
BH*vsxe $H5PB' b subplot(1,2,2);
Jr1^qY`0+ R %}k52` plot(theta,atp,'-',theta,ats,'--','LineWidth',2)
oNiS"\t o AQ92~b legend('arg(t_p)','arg(t_s)')
%/'[GC'y! Ke,-8e#Q xlabel('\theta_i')
6W#+U< -'YX2!IU, ylabel('\phi')
Ppx* Y!Z@1V` title(['n_1=',num2str(n1),',n_2=',num2str(n2)])
MjG.Ili$m dQizM^j axis([0 90 -3.5 3.5])
f \4Qp gR?3)m grid on
E}a3. 6)p $_)f|\s