This project has moved and is read-only. For the latest updates, please go here.

FFT questions

Sep 8, 2010 at 4:12 AM

I've looked through the documentation and haven't been able to find any answers.  The only stuff for FFT appears to be for the Iridium package, not the new Numerics.


Some background on the project.  As part of this I am reading in a wave file and doing FFTs on it to determine the frequencies present in a given frame.  Since the FFT returns the same number of elements as input (instead of 1/2 as some do) which half is the better (more correct) half?  Sometimes I have noticed that the higher half have a slightly different result set than the lower half (generally on items that were right at the boundary of a particular bin I think).

Also, it appears that the first bin is only 1/2 the width of the rest of the bins.  For instance if I do a FFT on 1024 samples of a 21 Hz wave that lasts 1 second I get (mostly) results in bin 1, if I do the same on a 33 Hz wave (1 sec) then I get bin 2.  Is this correct?


Thanks for your help.

Sep 9, 2010 at 7:29 AM


>The only stuff for FFT appears to be for the Iridium package, not the new Numerics.

For Numerics, take a look at the MathNet.Numerics.IntegralTransforms namespace. It is best to grab the latest version of the source code, not the January alpha release.

As for your other question, maybe someone more familliar with FFT can answer it.



Sep 9, 2010 at 2:58 PM



Thanks for your reply.  I was actually referring to the documentation about the Numerics package, specifically the stuff on FFT.  It appears as if the majority of the FFT documentation is the same as it was for Iridium, yet the code functions differently.


I realize that I forgot to include some pertinent information in my original post.  The wave file I am reading in is recorded at 44100 Hz (necessary to know to determine size of the bins) and by bin 1 I am referring to the first element in the array of magnitudes returned by the FFT.