Quantcast
Channel: Math.NET Numerics
Viewing all articles
Browse latest Browse all 971

New Post: using discrete fourier transform to observe pure sinusoidal signal

$
0
0
Here's a version of getPeakIndices which will work. the above version will also sort the complex values, so the indices won't point to the right location anymore.
staticint[] getPeakIndices(Complex[] dtfme, int numPoints)
{
    int n = dtfme.Length / 2;

    var magnitudes = dtfme.Take(n).Select((z) => z.Magnitude).ToArray();
    var indices = Enumerable.Range(0, n).ToArray();

    Array.Sort(magnitudes, indices);

    return indices.Reverse().Take(numPoints).ToArray();
}

Viewing all articles
Browse latest Browse all 971

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>