Skip to contents

Analytic-signal magnitude via the Hilbert transform. Delegates to the native FFT construction (module 20).

Usage

morie_dsp_hilbert_envelope(x)

Arguments

x

Numeric vector.

Value

Numeric vector, length(x).

References

Rangayyan & Krishnan (2015), Ch. 4, sec. 4.6.

Examples

fs <- 1024
t <- seq.int(0, 1023) / fs
x <- 2 * sin(2 * pi * 64 * t)
env <- morie_dsp_hilbert_envelope(x)
mean(env[20:1004])  # ~2 (the amplitude)
#> [1] 2