Reputation: 31
I want to take inverse fourier transform of a signal. I use this
fftw_plan_dft_c2r_1d
however, the output vector is required to be double. The question is isn't that the IFFT of a signal gives complex number result?
Upvotes: 1
Views: 399
Reputation: 14579
The definition of the Discrete Fourier Transform (DFT) allows for the time-domain input to be a complex valued signal and produces a frequency-domain result which is in general also complex valued. Correspondingly the inverse transform of that complex-valued frequency-domain result would produce the same (or at least within the available implementation's numerical precision) original time-domain signal. The result of the inverse transform could thus be complex.
Just the same, if we restrict time-domain inputs of the forward transform to real-valued signals then we would similarly expect the inverse transform of the corresponding frequency-domain spectrum to give us back the same original real-valued signal.
Note that the forward transform of those real-valued signal produces a frequency domain result that exhibits Hermitian symmetry (and conversely, if a frequency domain signal has Hermitian symmetry it must be the transform of a real valued signal). fftw_plan_dft_c2r_1d
then computes the inverse transform (which is real-valued and stored in double
) under the assumption that the frequency domain spectrum indeed has Hermitian symmetry.
Upvotes: 2