1、引入MathNet.Numerics。
2、
var b = new double[] { 1, 2, 3, 4, 5, 6, 7, 8, 9 }; var a = b.Select(d => new Complex(d, 0)).ToArray(); Transform.FourierForward(a); var c = a.Select(d => d.Magnitude).ToArray();