0
$\begingroup$

I am having a similar problem to the one discussed here: Computing wavenumbers for discrete Fourier transform

Say I performed a FFT on $N = 256$ points, are my wavenumbers indexed as [-128,127] or [-127,128]?

$\endgroup$
1
$\begingroup$

$e^{2i \pi n (k+N)/N} = e^{2i \pi n k/N}$ for $n \in \mathbb{Z}$.

Thus it makes a difference only when you use the DFT to interpolate the signal at non-integer values.

In that case it seems legitimate to ask : the interpolation is the smoothest possible, and it is real for real signals.

Those conditions give for $N$ even :

$$X(k) = \sum_{n=0}^{N-1} x(n) e^{-2i \pi nk/N}, \qquad x(t) = \frac{1}{N}\sum_{k=-N/2+1}^{N/2-1} X(k) e^{2i \pi tk/N} \ \ + \ \ \frac{X(N/2)}{N} \cos(\pi t)$$

Note how $\int_0^N |x(t)|^2dt= \sum_{n=0}^{N-1} |x(n)|^2 - \frac{1}{2 N} |X(N/2)|^2$, so if you prefer to preserve instead the energy and linearity, the interpolation won't be real for real signals anymore.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.