FFT (method accepts data array of 2n size only, where n may vary in the [1, 14] range.)

  • Thread starter Thread starter Fulaninhuu
  • Start date Start date
F

Fulaninhuu

Guest
Hiii !!!

I would like to FFT an integer signal.
My signal has a size of 2 ^ 19 but my FFT only goes up to 2 ^14, how do I change this in this code?


public double[] FFT(double[] data)
{
double[] fft = new double[data.Length]; // this is where we will store the output (fft)
Complex[] fftComplex = new Complex[data.Length]; // the FFT function requires complex format
for (int i = 0; i < data.Length; i++)
{
fftComplex = new Complex(data, 0.0); // make it complex format (imaginary = 0)
}
Accord.Math.FourierTransform.FFT(fftComplex, Accord.Math.FourierTransform.Direction.Forward);
for (int i = 0; i < data.Length; i++)
{
fft = fftComplex.Magnitude; // back to double
}
return fft;

}

Continue reading...
 
Back
Top