필터 지우기
필터 지우기

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

조회 수: 3 (최근 30일)
MOHD
MOHD 2014년 6월 17일
편집: Star Strider 2014년 6월 18일
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

답변 (1개)

Dishant Arora
Dishant Arora 2014년 6월 17일
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
MOHD
MOHD 2014년 6월 17일
Sorry
imagesc(log(I))
is not giving
Dishant Arora
Dishant Arora 2014년 6월 18일
편집: Dishant Arora 2014년 6월 18일
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.

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

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by