This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Multisignal 1-D wavelet compression scores




[THR,L2SCR,NOSCR,IDXSORT] = mswcmpscr(DEC) computes four matrices: thresholds THR, compression scores L2SCR and NOSCR, and indices IDXSORT. The decomposition DEC corresponds to a matrix of wavelet coefficients CFS obtained by concatenation of detail and (optionally) approximation coefficients, where

CFS = [cd{DEC.level}, ... , cd{1}] or CFS = [ca, cd{DEC.level}, ... , cd{1}]

The concatenation is made rowwise if DEC.dirDec is equal to 'r' or columnwise if DEC.dirDec is equal to 'c' .

If NbSIG is the number of original signals and NbCFS the number of coefficients for each signal (all or only the detail coefficients), then CFS is an NbSIG-by-NbCFS matrix. Therefore,

  • THR, L2SCR, NOSCR are NbSIG-by-(NbCFS+1) matrices

  • IDXSORT is an NbSIG-by-NbCFS matrix

  • THR(:,2:end) is equal to CFS sorted by row in ascending order with respect to the absolute value.

  • For each row, IDXSORT contains the order of coefficients and THR(:,1)=0.

For the ith signal:

  • L2SCR(i,j) is the percentage of preserved energy (L2-norm), corresponding to a threshold equal to CFS(i,j-1) (2jNbCFS), and L2SCR(:,1)=100.

  • N0SCR(i,j) is the percentage of zeros corresponding to a threshold equal to CFS(i,j-1) (2jNbCFS), and N0SCR(:,1)=0.

Three more optional inputs may be used:

[...] = mswcmpscr(...,S_OR_H,KEEPAPP,IDXSIG)

  • S_OR_H ('s' or 'h') stands for soft or hard thresholding (see mswthresh for more details).

  • KEEPAPP (true or false) indicates whether to keep approximation coefficients (true) or not (false).

  • IDXSIG is a vector that contains the indices of the initial signals, or the character vector 'all'.

The defaults are, respectively, 'h', false and 'all'.


% Load original 1D-multisignal.
load thinker

% Perform a decomposition at level 2 using wavelet db2.
dec = mdwtdec('r',X,2,'db2');

% Compute compression performances for soft an hard thresholding.
[THR_S,L2SCR_S,N0SCR_S] = mswcmpscr(dec,'s');
[THR_H,L2SCR_H,N0SCR_H] = mswcmpscr(dec,'h');


Daubechies, I. (1992), Ten lectures on wavelets, CBMS-NSF conference series in applied mathematics. SIAM Ed.

Mallat, S. (1989), “A theory for multiresolution signal decomposition: the wavelet representation,” IEEE Pattern Anal. and Machine Intell., vol. 11, no. 7, pp. 674–693.

Meyer, Y. (1990), Ondelettes et opérateurs, Tome 1, Hermann Ed. (English translation: Wavelets and operators, Cambridge Univ. Press. 1993.)

Introduced in R2007a

Was this topic helpful?