Forums

About some problem in 2D FFTW

Started by zues May 1, 2006
I use r2c function to transfer a Guassian distribution.
But the image part of the result are all zero.
Is this correct?

array[nx][ny]=> nx=ny=even;

the result is

http://vda.ee.nctu.edu.tw/~zues/1.bmp

but the result should be (I run in matlab)

http://vda.ee.nctu.edu.tw/~zues/1.bmp

Appreciate your help!!!




zues wrote:
> I use r2c function to transfer a Guassian distribution. > But the image part of the result are all zero.
See Q3.16 in the FFTW FAQ.
I use ESTIMATE,so the problem is not here.

The program output is not zero.

But the image part of the output is zero.


>zues wrote: >> I use r2c function to transfer a Guassian distribution. >> But the image part of the result are all zero. > >See Q3.16 in the FFTW FAQ. > >
If you transform a Gaussian centered at the origin (i.e. at the corners
of the array), or alternatively centered at the middle of the array,
then the imaginary part of the output *should* be zero (up to numerical
precision).  The transform of a real and even function is real and even.