Documentation Center

  • Trial Software
  • Product Updates

wdecenergy

Multisignal 1-D decomposition energy distribution

Syntax

[E,PEC,PECFS] = wdecenergy(DEC)
[E,PEC,PECFS,IDXSORT,LONGS] = wdecenergy(DEC,'sort')
[E,PEC,PECFS] = wdecenergy(DEC,OPTSORT,IDXSIG)
[E,PEC,PECFS,IDXSORT,LONGS] = wdecenergy(DEC,OPTSORT,IDXSIG)

Description

[E,PEC,PECFS] = wdecenergy(DEC) computes the vector E that contains the energy (L2-Norm) of each decomposed signal, the matrix PEC that contains the percentage of energy for each wavelet component (approximation and details) of each signal, and the matrix PECFS that contains the percentage of energy for each coefficient.

  • E(i) is the energy (L2-norm) of the ith signal.

  • PEC(i,1) is the percentage of energy for the approximation of level MAXLEV = DEC.level of the ith signal.

  • PEC(i,j), j=2,...,MAXLEV+1 is the percentage of energy for the detail of level (MAXLEV+1-j) of the ith signal.

  • PECFS(i,j), is the percentage of energy for jth coefficients of the ith signal.

[E,PEC,PECFS,IDXSORT,LONGS] = wdecenergy(DEC,'sort') returns PECFS sorted (by row) in ascending order and an index vector IDXSORT.

  • Replacing 'sort' by 'ascend' returns the same result.

  • Replacing 'sort' by 'descend' returns PECFS sorted in descending order.

LONGS is a vector containing the lengths of each family of coefficients.

[E,PEC,PECFS] = wdecenergy(DEC,OPTSORT,IDXSIG) returns the values for the signals whose indices are given by the IDXSIG vector.

[E,PEC,PECFS,IDXSORT,LONGS] = wdecenergy(DEC,OPTSORT,IDXSIG) returns the values for the signals whose indices are given by the IDXSIG vector, the index vector IDXSORT, and LONGS, which is a vector containing the lengths of each family of coefficients. Valid values for OPTSORT are 'none', 'sort', 'ascend', 'descend'.

Examples

% Load original 1D-multisignal.
load thinker
% Perform a decomposition at level 2 using wavelet db2.
dec = mdwtdec('r',X,2,'db2');
% Compute the energy distribution.
[E,PEC,PECFS] = wdecenergy(dec);
% Display the total energy and the distribution of energy
% for each wavelet component (A2, D2, D1).
E31 = E(31)
perA2D2D1 = PEC(31,:)
% Compare the coefficient energy distribution
% for signal 1 and signal 31.
PECFS_1  = PECFS(1,:);
PECFS_31 = PECFS(31,:);
figure;
plot(PECFS_1,'--r','linewidth',2); hold on
plot(PECFS_31,'b','linewidth',2);
grid; set(gca,'Xlim',[1,size(PECFS,2)])
title('PECFS1 dashed line and PECFS31 solid line')

See Also

|

Was this topic helpful?