コード例 #1
0
        public FourierSeries(IEnumerable<double> samples)
        {
            _complexes = samples.Select(x => new Complex(x, 0))
                                .ToArray();

            var dft = new MathNet.Numerics.IntegralTransforms.Algorithms.DiscreteFourierTransform();
            dft.BluesteinForward(_complexes, FourierOptions.NoScaling);
        }
コード例 #2
0
ファイル: Fourier.cs プロジェクト: menozz/mirelle
 /// <summary>
 /// Perform a FFT using Bluestein's algorithm
 /// </summary>
 /// <param name="input">Array of complex numbers</param>
 /// <returns></returns>
 public Complex[] FFT(Complex[] input)
 {
     Complex[] output = new Complex[input.Length];
       Array.Copy(input, output, input.Length);
       var transform = new MN.Algorithms.DiscreteFourierTransform();
       transform.BluesteinForward(output, MN.FourierOptions.Matlab);
       return output;
 }