Learn R Programming

DecomposeR (version 1.0.6)

HilbertTransform: The Hilbert transform

Description

Creates the analytic signal using the Hilbert transform.

Usage

HilbertTransform(sig)

Value

asig Analytic signal

Arguments

sig

Signal to transform.

Author

Daniel C. Bowman (in the hht package)

Details

Creates the real and imaginary parts of a signal.

See Also

HilbertEnvelope, InstantaneousFrequency

Examples

Run this code
tt   <- seq(1000) * 0.01
sig  <- sin(pi * tt)
asig <- HilbertTransform(sig)

plot(tt, sig, xlim = c(0, 12))

lines(tt, Re(asig), col = "green")
lines(tt, Im(asig), col = "red")
legend("topright", col = c("black", "green", "red"),
       lty = c(NA, 1, 1), pch = c(1, NA, NA),
       legend = c("Signal", "Real", "Imaginary"))

Run the code above in your browser using DataLab