FUNCTION REFERENCE

envelope

Compute upper and lower analytic, RMS or peak envelopes.

Compute upper and lower analytic, RMS or peak envelopes.

Syntax

[up,lo] = envelope(x[,n,'analytic'|'rms'|'peak'])

Default 'analytic': subtract each column's mean, take the magnitude of its FFT analytic signal, then add/subtract this magnitude about that mean. n defaults to 3 and is validated but does not alter the exact FFT projection. 'rms': centered length-n root-mean-square, truncating the window at the ends, with lower envelope equal to -up; even windows include one extra sample to the left. 'peak': piecewise-linear interpolation through local maxima/minima and endpoints; nearby extrema less than n samples apart keep the more extreme of the adjacent pair, choosing the first on ties. Matrices operate down columns.

Example

[up,lo] = envelope([0 1 0 -1],3,'analytic');

Example

[up,lo] = envelope([0 1 0 -1 0],3,'rms');

Example

[up,lo] = envelope([0 2 0 -2 0 2 0],1,'peak');

Differences from MATLAB: analytic uses a periodic FFT rather than a length-n FIR; peak uses linear interpolation rather than splines. Finite real doubles only, 1<=n<=4097; no dimension argument.

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.