Description Usage Arguments Details Value Note Author(s) See Also Examples

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

1 2 3 4 5 |

`wave` |
an R object. |

`f` |
sampling frequency of |

`channel` |
channel of the R object, by default left channel (1). |

`envt` |
the type of envelope to be returned: either "abs" for absolute amplitude envelope or "hil" for Hilbert amplitude envelope. See Details section. |

`msmooth` |
a vector of length 2 to smooth the amplitude envelope with a mean sliding window. The first component is the window length (in number of points). The second component is the overlap between successive windows (in %). See examples. |

`ksmooth` |
kernel smooth via |

`ssmooth` |
length of the sliding window used for a sum smooth. |

`asmooth` |
length of the sliding window used for an autocorrelation smooth. |

`fftw` |
if |

`norm` |
a logical, if |

`plot` |
logical, if |

`k` |
number of horizontal sections when |

`j` |
number of vertical sections when |

`...` |
other |

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`

).

Data are returned as one-column matrix when `plot`

is `FALSE`

.

Be aware that smoothing with either `msmooth`

or `ksmooth`

changes the original number of points describing `wave`

.

Jerome Sueur. Implementation of 'fftw' argument by Jean Marchal and Francois Fabianek. Implementation of 'asmooth' by Thibaut Marin-Cudraz.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | ```
data(tico)
# Hilbert amplitude envelope
env(tico)
# absolute amplitude envelope
env(tico, envt="abs")
# smoothing with a 10 points and 50% overlaping mean sliding window
env(tico, msmooth=c(10,50))
# smoothing kernel
env(tico, ksmooth=kernel("daniell",10))
# sum smooth
env(tico, ssmooth=50)
# autocorrelation smooth
env(tico, asmooth=50)
# overplot of oscillographic and envelope representations
oscillo(tico)
par(new=TRUE)
env(tico, colwave=2)
``` |

```
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.