How to implementation DFT (discrete fourier transform) to intensity?

8 visualizaciones (últimos 30 días)
MOHD
MOHD el 17 de Jun. de 2014
Editada: Star Strider el 18 de Jun. de 2014
Here I am trying to calculate intensity of Xpolarized light by using DFT (discrete fourier
transform) instead of fft, by using DFT I am getting intensity in 4th quadrant only (Which is
shown in figure (1)). How can I get intensity in total plane. Can some help me in this regard
clear all;
clc;
lose all;
[kx,ky]=meshgrid(-1:2/21:1);
circ=sqrt(kx.^2+ky.^2)<1;
alp=asin(0.95);
k0=1/sin(alp);
kz=sqrt(k0^2-(kx.^2+ky.^2));
GX=sqrt(k0./kz).*((k0*ky.^2+kz.*kx.^2)./(k0*(kx.^2+ky.^2)));
GY=sqrt(k0./kz).*((kz-k0).*kx.*ky)./(k0*(kx.^2+ky.^2));
la=1;
lb=0;
EX=(GX.*la-rot90(GY.*lb, 3));
M=22;
N=22;
F=zeros(22,22);
for Xpx=1:M
for Xpy=1:N
F(Xpx,Xpy)=sum(sum(EX.*exp(1j*2*pi*(((Xpx.*kx)/M)+((Xpy.*ky)/N)))));
end
end
F=F/(M*N);
I1=F.*conj(F);
figure(1)
imagesc(I1),colormap gray;axis image; axis off;
Thank you very much in advance Your Mohd. Gaffrar

Respuestas (1)

Dishant Arora
Dishant Arora el 17 de Jun. de 2014
Use the logarithmic scale to image the fourier transform. Fourier transform results in large dynamic range, thereby logarithmic scale makes it easy to see small signal components in the presence of large ones. Probably you can do:
imagesc(log(I))
  2 comentarios
MOHD
MOHD el 17 de Jun. de 2014
Sorry
imagesc(log(I))
is not giving
Dishant Arora
Dishant Arora el 18 de Jun. de 2014
Editada: Dishant Arora el 18 de Jun. de 2014
The kx and ky you are using inside the loop for dft calualation, shouldn't they be integers. They need to be indices not spatial coordinates. Make appropriate changes to your code and cross check with built in fft2. I tried and it works for me.

Iniciar sesión para comentar.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by