The FFT in R is defined for k = 0, ..., N - 1
.
What if you wanted the frequencies for different values of k
?
I've seen definitions of FFT that use k = - (N - 1), ..., 0, ..., N - 1
.
How would you get these in R?
You can get them using both fft(x)
and fft(x, inverse = TRUE)
, but this computes the k = 0
component twice.