Example #1
0
File: FFT.cs Project: DonDoff/Maths
 public static Vector CalculateIFFT(Vector v)
 {
     if (Math.Log(v.Size, 2) % 1 > 0) {
         v = PadWithZeros(v);
     }
     // The IFFT is the same as the FFT applied on the complex conjugate of the vector, divided by the size.
     return 1.0 / v.Size * CFFT(v.AppyToAllElements(x => x.Conjugate()).ToColumnVector());
 }
Example #2
0
 public static Vector FFTNormalize(Vector v)
 {
     double max = MatrixMath.Max(v).Abs();
     return v.AppyToAllElements(x => x.Abs() / max).ToColumnVector();
 }