Accelerating the pace of engineering and science

# Documentation Center

• Trial Software

# wenergy

Energy for 1-D wavelet or wavelet packet decomposition

## Syntax

[Ea,Ed] = wenergy(C,L)
E = wenergy(T)

## Description

For a one-dimensional wavelet decomposition [C,L] (see wavedec for details), [Ea,Ed] = wenergy(C,L) returns Ea, which is the percentage of energy corresponding to the approximation and Ed, which is the vector containing the percentages of energy corresponding to the details.

For a wavelet packet tree T (see wptree, wpdec, wpdec2), E = wenergy(T) returns a vector E, which contains the percentages of energy corresponding to the terminal nodes of the tree T. In this case, wenergy is a method of the wptree object T, which overloads the previous wenergy function.

## Examples

```% Example 1: 1-D wavelet decomposition
%-------------------------------------
[C,L] = wavedec(noisbump,4,'sym4');
[Ea,Ed] = wenergy(C,L)

Ea =

88.2860

Ed =

2.1560    1.2286    1.4664    6.8630

% Example 2: 1-D wavelet packet decomposition
%--------------------------------------------