Quantcast

Documentation Center

  • Trial Software
  • Product Updates

mdwtrec

Multisignal 1-D wavelet reconstruction

Syntax

X = mdwtrec(DEC)
X = mdwtrec(DEC,IDXSIG)
Y = mdwtrec(DEC,TYPE,LEV)
A = mdwtrec(DEC,'a')
A = mdwtrec(DEC,'a',LEVDEC)
D = mdwtrec(DEC,'d')
CA = mdwtrec(DEC,'ca')
CA = mdwtrec(DEC,'ca',LEVDEC)
CD = mdwtrec(DEC,'cd',MODE)
CFS = mdwtrec(DEC,'cfs',MODE)
Y = mdwtrec(...,IDXSIG)

Description

X = mdwtrec(DEC) returns the original matrix of signals, starting from the wavelet decomposition structure DEC (see mdwtdec).

X = mdwtrec(DEC,IDXSIG) reconstructs the signals whose indices are given by the vector IDXSIG.

Y = mdwtrec(DEC,TYPE,LEV) extracts or reconstructs the detail or approximation coefficients at level LEV depending on the TYPE value. The maximum value for LEV is LEVDEC = DEC.level.

When TYPE is equal to:

  • 'cd' or 'ca', coefficients of level LEV are extracted.

  • 'd' or 'a', coefficients of level LEV are reconstructed.

  • 'a' or 'ca', LEV must be such that 0LEVLEVDEC.

  • 'd' or 'cd', LEV must be such that 1LEVLEVDEC.

A = mdwtrec(DEC,'a') is equivalent to A = mdwtrec(DEC,'a',LEVDEC).

D = mdwtrec(DEC,'d') returns a matrix containing the sum of all the details, so that X = A + D.

CA = mdwtrec(DEC,'ca') is equivalent to CA = mdwtrec(DEC,'ca',LEVDEC).

CD = mdwtrec(DEC,'cd',MODE) returns a matrix containing all the detail coefficients.

CFS = mdwtrec(DEC,'cfs',MODE) returns a matrix containing all the coefficients.

For MODE = 'descend' the coefficients are concatened from level LEVDEC to level 1 and MODE = 'descend' concatenates from level 1 to level LEVDEC). The default is MODE = 'descend'. The concatenation is made row-wise if DEC.dirDEC = 'r' or column-wise if DEC.dirDEC = 'c'.

Y = mdwtrec(...,IDXSIG) extracts or reconstructs the detail or the approximation coefficients for the signals whose indices are given by the vector IDXSIG.

Examples

% Load original 1D-multisignal.
load thinker

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

% Reconstruct the original matrix of signals, starting from 
% the wavelet decomposition structure dec.
XR = mdwtrec(dec);

% Compute the reconstruction error. 
errREC = max(max(abs(X-XR)))

errREC =
  2.1026e-010

% Reconstruct the original signal 31, the corresponding 
% approximation at level 2, details at levels 1 and 2. 
Y = mdwtrec(dec,31);
A2 = mdwtrec(dec,'a',2,31);
D2 = mdwtrec(dec,'d',2,31);
D1 = mdwtrec(dec,'d',1,31);

% Compute the reconstruction error for signal 31. 
errREC = max(abs(Y-A2-D2-D1))

errREC =
  6.8390e-014

References

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

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

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

See Also

|

Was this topic helpful?