I’m using FFTW to analyze elevation data, but I started out just by looking at a simple 1D fft to make sure I had everything working. It seems to work except for the normalization (scale) factors, which I can’t figure out from the documentation, mostly because my numbers are ridiculously large. For example, when I tried to just take an fft of a cosine wave
1 6.12323e-017 -1 -1.83697e-016 1 3.06162e-016 -1 -4.28626e-016 1 5.51091e-016 -1 -2.44991e-015 etc...
I got the transform to be
4.33743e-013 1.06036e+267 3.25205e+265 1.05963e+267 6.49675e+265 1.05743e+267 9.72679e+265 1.05379e+267 1.29349e+266 1.04869e+267 1.61138e+266 1.04216e+267 etc...
eg, ridiculously huge numbers.
Any help would be appreciated.
You are FFT-ing complex numbers, but you initialized your array as normal (without imaginary part) array.
I went ahead onto their side, and found out that there are NEW functions that provide double to complex and complex to double fft-ing. Neat-o!
Here: http://www.fftw.org/doc/New_002darray-Execute-Functions.html