# Inverse FFT data format with FFTW

I perform FFT of two real sequences using "two for the price of one" - array $x[n]$ and $y[n]$ is packed as a complex number - $z[n] = x[n] + j y[n]$ - using FFT2 and FFTW. I am able to decode the half-complex output format of FFTW and the result match with the output of FFT2.

The output conversion goes like this. If FFT of complex sequence $z[n]$ is $Z[k]$ where $Z[k] = FFT\{z[n]\}$. The equations look something like this

$$FFT\{x[n]\} = (Z[k] + Z^*[N-k]) / 2$$

$$FFT\{y[n]\} = (Z[k] - Z^*[N-k]) / (2j)$$

When I perform inverse FFT with FFTW I am unable to understand the output format of FFTW and the inverse output or FFT2 do not agree with FFTW. Any clue on how to transform the output of inverse FFT to generate inverse FFT of two sequences.

• Do you mean an inverse FFT of $Z[k]$ to recover $x[n]$ and $y[n]$? – Matt L. Jun 8 '14 at 21:36
• Yes, After I am done with forward FFT, the two real arrays x(k) and y(k) are multiplied by some quantity (operation in k-space), so they do not retain hermitian symmetry. Then perform inverse FFT of Z(k) to recover x(n) and y(n). The inverse FFT performed with FFTW accepts complex input and genrates complex output - I am hoping to recover x(n) and y(n) from it. – user9150 Jun 11 '14 at 1:08
• The inverse FFT (with FFTW) gives you $Nz[n]$, where $N$ is the FFT length. So you should be able to get $x[n]=\frac{1}{N}\text{Re}(z[n])$ and $y[n]=\frac{1}{N}\text{Im}(z[n])$. – Matt L. Jun 11 '14 at 9:20