How to plot Fresnel Diffraction?

조회 수: 62(최근 30일)
Mehmet 2014년 3월 1일
댓글: Matthew Fisher 2020년 12월 1일
Hi I am trying to plot 1D fresnel diffraction in MATLAB. Is there any way of it?
  댓글 수: 1
Image Analyst
Image Analyst 2014년 3월 1일
Yes. You need the equation giving the signal as a function of distance, then use plot().

댓글을 달려면 로그인하십시오.


Prasobhkumar P. P.
Prasobhkumar P. P. 2020년 3월 4일
편집: Prasobhkumar P. P. 2020년 3월 4일
function U = fresnel_advance(U0, dx, dy, z, lambda)
% The function receives a field U0 at wavelength lambda
% and returns the field U after distance z, using the Fresnel
% approximation. dx, dy, are spatial resolution.
%If required, Please see below code's 2d version at
[~ nx] = size(U0);
Lx = dx * nx;
dfx = 1./Lx;
u = ones(nx,1)*((1:nx)-nx/2)*dfx;
O = fftshift(fft(U0));
H = exp(1i*k*z).*exp(-1i*pi*lambda*z*(u.^2));
U = ifft2(O.*H);
  댓글 수: 1
Matthew Fisher
Matthew Fisher 2020년 12월 1일
Shouldn't H=exp(1i*k*z).*exp(-1i*pi/(lambda*z)*(u.^2))?

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by