MATLAB: Ifft in 2D : wrong reasoning

fft

Hi,
I am trying to have a grid in a temporal space from some points in a frequency space in 2D
For example, if I take the point (1,0) in the frequency space, by applying an Inverse Fourier Transform to the matrix representing the space, I should have some vertical lines in the temporal space with a frequency of 1 unit vertically.
Here is a very short code to show my idea :
N=100;
F=zeros(N,N);
F(1,10)=1;
FF=abs(ifft(F));
figure(1)
pcolor(FF)
As a result I have just one vertical line. Furthermore, when I try to change the point with (0,1) for example, I have also a vertical line… But I would like to have a horizontal line, because the periodicity is horizontal.
Could you help me with this problem ? I think the problem comes from my maths and not from matlab…
I have also another question : Is there any easy way to use a continuous space instead than a discrete space (I have a matrix of 100×100 here, I would like to have a continuous space)
Thank a lot.

Best Answer

True, narrow things in one domain mean wide things in the other. So delta functions in one domain mean infinitely wide things (lines, planes) in the other domain. Still, you need to think a little differently in 2D. A dot (spike, delta function) in 1D gives a single line in 1D spatial domain, and I think you understand that and why that is. However a dot in 2D Fourier domain is a plane in the 2D spatial domain. This would be so much easier to visualize if you had a degree in Optics (like I do) and played around for years in the laser lab, and can visualize the patterns as diffraction patterns - once you get an intuitive feel for thinking like that, it all becomes a lot clearer.