資源簡介
基于MATLAB的菲聶耳衍射仿真模擬,用于光學仿真初學者學習,并可作為其他光學衍射仿真的參考資料。
代碼片段和文件信息
%
clear
%
%?Fresnel?diffraction
%
%
%
%
figure(1);set(gcf‘color‘‘white‘);
X=1000*10^-6;?%microns
lambda=1*10^-6;?%micron*10^-9
N=1024;?%?samples?per?axis
xrange=linspace(-XXN);
urange=(-N/(4*X)):(1/(2*X)):(N/2-1)/(2*X);
[xy]=meshgrid(xrange);
[uv]=meshgrid(urange);
%?input?pattern?is?modulated?by?1?mm?gaussian?chirp?pattern?varying?from
%?100?micron?period?to?10?micron?period
%
f=exp(-pi*(x.^2+y.^2)/250^2).*(1+cos(pi*5*10^(-4)*x.^2));
subplot(221);imagesc(xrangexrangef);colormap?‘gray‘;axis?‘square‘;title(‘f(xy)‘);?zoom(30);
d=1000*10^-6;?%?microns
fresnelT=exp(i*
評論
共有 條評論