[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: inverse fourier transform

From: Quentin H. Spencer
Subject: Re: inverse fourier transform
Date: Wed, 02 Apr 2003 00:07:46 -0700
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.3) Gecko/20030314

Heber Farnsworth wrote:

Some of you will laugh at me for this but I've never done an inverse fourier transform. I need to use a probability density function which I don't know in closed form but I do have a closed form for it's characteristic function (fourier transform). But when I try ifft I get something that is complex. I know that this thing is the fourier transform of a real density. How do I get a real (not complex) thing out of this? Here some things I'm not sure about which may be causing my confusion.

1. I'm not sure what range of frequencies to use: [-pi,pi]? something else?

2.  I may not be using fftshift correctly.

This is possible. Misalignment by one sample is enough to cause
problems. You do want to choose frequencies from [-pi,pi], and assuming
you want real output, you need the function to be symmetric around 0. If
you are doing, say, a 64 point IFFT, index 1 is DC, and index 33 is
Nyquist (pi and -pi), so indices [2:32] must be a mirror image of
indices [34:64] in order for the IFFT to be real. Because of machine
precision, you will always get complex output, so after you verify that
the imaginary part is just noise, you can ignore it.

Is there anyone out there that does this a lot that can give me some pointers?

Heber Farnsworth

Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:
How to fund new projects:
Subscription information:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]