anthonix / ffts

The Fastest Fourier Transform in the South
http://anthonix.com/ffts
Other
536 stars 213 forks source link

Tips on processing vector with sizes that is not n power of 2 #43

Open y22ma opened 9 years ago

y22ma commented 9 years ago

Just wondering if anyone has tips on how to use ffts on vector with sizes that are not n power of 2. Off the top of my head, I suppose I could pad the signal with zeros?

JayKickliter commented 9 years ago

You can do that, but then the output length will also be padded the length. An alternative is to use the Chrip-Z method, which lets you do an FFT of any length.

y22ma commented 9 years ago

@JayKickliter Thanks, this looks very involved. Will try to implement it, but I will likely go forward with the zero padding approach.

zbeekman commented 9 years ago

FWIW, FFTW can perform fast transforms of vector lengths that are products of small primes.