0

I have found some code for a simple DFT algorithm here: Discrete Fourier transform

But I have read the number of Bins would be half the number of samples, but this gives the same number of entries in the output array as are in the input. So my question is, how does the bin size relate to the number of samples and the Fourier transform size

  • https://dsp.stackexchange.com/questions/26927/what-is-a-frequency-bin – Wyck May 17 '20 at 15:21
  • 2
    The DFT always produces the same number of output samples as input samples. Half of them are redundant iff the input is real-valued. Each complex output value carries twice the information of one real input value. – Cris Luengo May 17 '20 at 15:23

1 Answers1

1

The number of FFT result complex bins is equal to the number of samples.

However, for strictly real input data, (the negative or upper) half of the FFT result is just a complex conjugate mirror image of the other half. Thus, for strictly real data, the number on non-redundant FFT bins is half the number of samples. An inverse rfft implementation usually leaves out the redundant input, but a full complex IFFT requires a mirrored input if you want a strictly real result.

hotpaw2
  • 70,107
  • 14
  • 90
  • 153