Is there a .Net (prefer F # or C #) implementation of the Hilbert-Juan transform?

Hilbert-Huang transformation, decomposition of the empirical regime ...

I found it implemented in R and Matlab. I would like to find its open source implementation in C # / F # /. NET

+5
source share
2 answers

The amount of quality open source numeric code for .NET is tiny. I tried to find a decent FFT just a couple of years ago. Therefore, I seriously doubt that you will find a decent existing implementation of this algorithm, because it is rather obscure!

Hilbert-Huang Transform FFT (, F # F #.NET Journal), , , MATLAB R

, ? ...

+2

Matlab. Matlab, , , , - .

MathNet FFT/iFFT.

public static Complex[] MatlabHilbert(double[] xr)
    {
        var fft = new MathNet.Numerics.IntegralTransforms.Algorithms.DiscreteFourierTransform();
        var x = (from sample in xr select new Complex(sample, 0)).ToArray();
        fft.BluesteinForward(x, FourierOptions.Default);
        var h = new double[x.Length];
        var fftLengthIsOdd = (x.Length | 1) == 1;
        if (fftLengthIsOdd)
        {
            h[0] = 1;
            for (var i = 1; i < xr.Length / 2; i++) h[i] = 2;
        }
        else
        {
            h[0] = 1;
            h[(xr.Length / 2)] = 1;
            for (var i = 1; i < xr.Length / 2; i++) h[i] = 2;
        }
        for (var i = 0; i < x.Length; i++) x[i] *= h[i];
        fft.BluesteinInverse(x, FourierOptions.Default);
        return x;
    }
+4

All Articles