logo资料库

光波在介质中界面上的反射及透射特性的仿真程序.doc

第1页 / 共3页
第2页 / 共3页
第3页 / 共3页
资料共3页,全文预览结束
clear all; %n1=1; %n2=1.52; n1=1.52; n2=1; n=n2./n1; if n1
hold on end legend('Frp') else subplot(1,3,1) qc=asin(n2./n1); qa=0:0.0001:qc; qb=asin(n1.*sin(qa)./n2); rs=-sin(qa-qb)./sin(qa+qb); rp=tan(qa-qb)./tan(qa+qb); ts=2.*cos(qa).*sin(qb)./sin(qa+qb); tp=2.*cos(qa).*sin(qb)./sin(qa+qb)./cos(qa-qb); plot(qa*180./pi,rs,'r',qa*180./pi,rp,'c',qa*180./pi,ts,'b',qa*180./pi, tp,'g') hold on qa=qc:0.0001:pi/2; tp=0; ts=0; rs=1; rp=1; plot(qa*180./pi,rs,'r',qa*180./pi,rp,'c',qa*180./pi,ts,'b',qa*180./pi, tp,'g') hold on legend('rs','rp','ts','tp') %rs qc=asin(n2./n1); subplot(1,3,2) for qa=0:pi/1000:qc qb=asin(n1.*sin(qa)./n2); rs=-sin(qa-qb)./sin(qa+qb); if rs<=0 Frs=pi; else Frs=0; end plot(qa*180./pi,Frs,'r') hold on end qa=qc:pi/1000:pi/2; Frs= 2.*atan(sqrt(sin(qa).^2-(n.^2))./cos(qa)); plot(qa*180./pi,Frs,'r')
hold on legend('Frs') %rp subplot(1,3,3) for qa=0:pi/1000:qc; qb=asin(n1.*sin(qa)./n2); rp=tan(qa-qb)./tan(qa+qb); if rp<=0 Frp=pi; else Frp=0; end plot(qa*180./pi,Frp,'b') hold on end qa=qc:pi/1000:pi/2; Frp= 2.*atan(sqrt(sin(qa).^2-(n.^2))./cos(qa)./n.^2); plot(qa*180./pi,Frp,'b') hold on legend('Frp') end
分享到:
收藏