Alexander Mashin
Alexander Mashin

Reputation: 711

AForge FFT (C#, .Net)

I have one question about AForge FFT. To fft i send complex array with 2048 elements. On exit I have 2048 complex elements. First of that always = (127,0) or (128, 0-1). And on preperties of DFT, first 1024 elements = last 1024 elements, but this is not true for AForge.Math.FourierTransform.FFT. I dont understand that i need to do. Please help me. I use it as:

Complex [] Array =new Complex [2048];
/*******fill the array************/
FourierTransform.FFT(Array, FourierTransform.Direction.Forward);

Upvotes: 1

Views: 4570

Answers (1)

Paul R
Paul R

Reputation: 212939

The first element corresponds to the DC (0 Hz) component, so it will typically be equal to whatever residual DC offset you have in the analogue hardware used to collect your input data.

For purely real inputs half of the outputs of the FFT are redundant as there is complex conjugate symmetry in this case. So just use bins 0..1023 to represent frequencies from 0 to Fs / 2 (and apply a factor of 2 to compensate for the negative frequency bins if you care about absolute values).

See this answer for further info on interpreting the values in your FFT output bins.

Upvotes: 3

Related Questions