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()); }
public static Vector FFTNormalize(Vector v) { double max = MatrixMath.Max(v).Abs(); return v.AppyToAllElements(x => x.Abs() / max).ToColumnVector(); }