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

7 ビュー (過去 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 Center および File ExchangeCorrelation and Convolution についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by