Multilevel 1-D wavelet decomposition
[C,L] = wavedec(X,N,
[C,L] = wavedec(X,N,Lo_D,Hi_D)
wavedec supports only
Type 1 (orthogonal) or Type 2 (biorthogonal) wavelets.
[C,L] = wavedec(X,N, returns
the wavelet decomposition of the signal
X at level
not enforce a maximum level restriction. Use
ensure the wavelet coefficients are free from boundary effects. If
boundary effects are not a concern in your application, a good rule
is to set
N less than or equal to
The output decomposition structure contains the wavelet decomposition
C and the bookkeeping vector
which contains the number of coefficients by level. The structure
is organized as in this level-3 decomposition example.
[C,L] = wavedec(X,N,Lo_D,Hi_D) returns
the decomposition structure as above, given the low- and high-pass
decomposition filters you specify.
The current extension mode for this example is zero-padding, as specified using the
Load original one-dimensional signal.
load sumsin; s = sumsin;
Perform decomposition at level 3 of s using
db1. Extract the detail coefficients at levels 1, 2, and 3 from the composition structure.
[c,l] = wavedec(s,3,'db1'); [cd1,cd2,cd3] = detcoef(c,l,[1 2 3]);
Plot the output of the decomposition.
plot(s) title('Original signal')
plot(cd3) title('Level 3 detail coefficients (cd3)')
Given a signal s of length N,
the DWT consists of log2 N stages
at most. The first step produces, starting from s,
two sets of coefficients: approximation coefficients CA1,
and detail coefficients CD1.
These vectors are obtained by convolving s with
the low-pass filter
Lo_D for approximation, and
with the high-pass filter
Hi_D for detail, followed
by dyadic decimation (downsampling).
More precisely, the first step is
The length of each filter is equal to 2N. If n = length(s), the signals F and G are of length n + 2N −1 and the coefficients cA1 and cD1 are of length
The next step splits the approximation coefficients cA1 in two parts using the same scheme, replacing s by cA1, and producing cA2 and cD2, and so on
The wavelet decomposition of the signal s analyzed at level j has the following structure: [cAj, cDj, ..., cD1].
This structure contains, for J = 3, the terminal nodes of the following tree:
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.)
Usage notes and limitations:
Variable-size data support must be enabled.