J
Jon Harrop
Anyone know of an FFT implementation for .NET that works for arbitrary "n"
(not just integral powers of two)?
(not just integral powers of two)?
This isn't a direct answer to your question, but the authors of Numerical
Recipes (Cambridge University Press) recommend that you use ONLY FFT's with
N an integral power of two, since those algorithms are by far the easiest.
If the length of your dataset is not an integral power of two, they suggest
as the most simplistic approach that you pad it with zeroes up to the next
power of two. Of course they also have more sophisticated suggestions that I
won't attempt to paraphrase here.
Tom said:This isn't a direct answer to your question, but the authors of Numerical
Recipes (Cambridge University Press) recommend that you use ONLY FFT's
with N an integral power of two, since those algorithms are by far the
easiest. If the length of your dataset is not an integral power of two,
they suggest as the most simplistic approach that you pad it with zeroes
up to the next power of two. Of course they also have more sophisticated
suggestions that I won't attempt to paraphrase here.
If you don't have a copy on your shelf, I recommend that you get one.
Early editions came with code in C or a couple of other languages of your
choice (depending on which edition you bought), but I believe that they
later stopped that practice.