Learn R Programming

seewave (version 1.6.3)

env: Amplitude envelope of a time wave

Description

This function returns the absolute or Hilbert amplitude envelope of a time wave.

Usage

env(wave, f, envt = "hil", msmooth = NULL,
ksmooth = NULL, ssmooth = NULL, norm = FALSE, plot = TRUE, k = 1, j = 1, ...)

Arguments

Value

  • Data are returned as one-column matrix when plot is FALSE.

Details

When envt is set as "abs", the amplitude envelope returned is the absolute value of wave. When envt is set as "hil", the amplitude envelope returned is the modulus (Mod) of the analytical signal of wave obtained through the Hilbert transform (hilbert).

See Also

oscillo,hilbert

Examples

Run this code
data(tico)
# Hilbert amplitude envelope
env(tico,f=22050)
# absolute amplitude envelope
env(tico,f=22050,envt="abs")
# smoothing with a 10 points and 50% overlaping mean sliding window
env(tico,f=22050,msmooth=c(10,50))
# smoothing kernel
env(tico,f=22050,ksmooth=kernel("daniell",10))
# sum smooth
env(tico,f=22050,ssmooth=50)
# overplot of oscillographic and envelope representations
oscillo(tico,f=22050)
par(new=TRUE)
env(tico,f=22050,colwave=2)

Run the code above in your browser using DataLab