• 大小: 1KB
    文件类型: .m
    金币: 1
    下载: 0 次
    发布日期: 2021-01-09
  • 语言: Matlab
  • 标签: matlab  

资源简介

基于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*

评论

共有 条评论