TVec.Hilbert Method

TVec Hilbert(TVec Vec, THilbertMethod method)

The fast hilbert transform (FFT based).

#NameTypeDescription
1VecTVecsource TVec
2methodTHilbertMethod

Result: stored in self (calling object), returns self for chaining

Remarks:

The method forms the imaginary orthogonal part (90 degrees phase shifted version of the original) from the real series by using the fast hilbert transform (FFT based) and saves the complex result in the calling vector. No windowing is performed. Vec must be a real vector or an exception is raised. The Dew.Math.TMtxVecBase.Length and Dew.Math.TMtxVec.Complex properties of the calling vector are set implicitly to match Vec vector.

Examples
TVec a;
TVec b;
TVec Re;
TVec Im;
double azero;
MtxVec.CreateIt(out a, out b, out Re, out Im);
try
    {
        a.SetIt(false,new double[] {1,2,3,4,5,6,7,8});
        b.Hilbert(a);
        Re.RealPart(b);
        Im.ImagPart(b);
        azero = Re.DotProd(Im);
        // if Re is orthogonal to Im, azero becomes 0
    }
finally
    {
        MtxVec.FreeIt(ref a, ref b, ref Re, ref Im);
    }
See Also: TVec.FFT, TVec.DCT