Fft

Hi,

I need to Fourier-analyse some distribution. Is there a way to perform a FFT in root?
I saw some discussion about that dated 1999/2000. Is there any news since that time?

thanks in advance,

Marco

Dear Marco

The statistical software “R” contains the functions fft and density, see:
stat.ethz.ch/R-manual/R-patched/ … l/fft.html
stat.ethz.ch/R-manual/R-patched/ … nsity.html

Since I needed the function density in my own root application , I have
converted the corresponding code to C++ in my own class TStat.

The enclosed macro “macroDensity.C” contains the necessary methods
FFT, IFFT and Density. You can do:

.L macroDensity.C
TestDensity("epanechnikov")

I hope the methods FFT and IFFT are useful for you.
(I have compared my method Density with the R function density, they
give exact the same values.)

BTW, if the root developers are interested to put these methods in class
TMath, they are welcome.

Best regards
Christian
macroDensity.C (19.7 KB)