www.pudn.com > Fourier-transform.rar > 1.asv, change:2015-04-21,size:496b


clear all 
clc 
close all 
%% 
x=-0.01:0.00003:0.01; 
y=-0.01:0.00003:0.01; %设置屏幕上观测范围 
z0=1;lamata=600e-9; %屏幕长度和波长 
a=2*pi/lamata; %相位变换系数 
[X,Y]=meshgrid(x,y); %制作xy平面上的点 
R1=sqrt((X+0.0001).^2+z0^2); %点与光源1的光程 
R2=sqrt((X-0.0001).^2+z0^2); %点与光源2的光程 
I1=1./R1; %光强,设E0=1 
I2=1./R2; 
I=I1+I2+2.*sqrt(I1.*I2).*cos(a.*(R2-R1));%光强合成公式 
figure; 
colormap(gray); 
clear x y R1 R2 I1 I2 
axis([-0.01,0.01,-0.01,0.01]); 
mesh(X,Y,I); 
view(0,90);