Original Address:A brief analysis of WAVEDEC and WRCOEF functions in MATLAB
Author:Cole3
Wavelet decomposition function:
[C,l] = Wavedec (x,n, ' wname ');
Returns the wavelet decomposition of the signal X at level N, using ' wname '. N must be a strictly positive integer. The output decomposition structure contains the wavelet decomposition vector cand the bookkeeping vector L.
The structure is organized as on this level-3 decomposition example.
Wrcoef wavelet reconstruction Function:
A one-dimensional signal is loaded with a zero-complement expansion mode
X = Wrcoef (' type ', c,l, ' Wname ', N);
Computes the vector of reconstructed coefficients, based on the wavelet decomposition structure [c,l], at level N. ' Wname ' is a string containing the wavelet name.
Example:
% wavelet test
% Cole3
% 2009.7.26
t=0:1:127;
Y=sin (T/10);
Plot (y);
Z=sin (T/5);
Plot (z);
For i = 1:64
Y (64+i) = Z (i);
End
Plot (y);
%f=fft (y);
%plot (ABS (f));
[D,a]=wavedec (y,3, ' DB5 ');
Subplot (211);p lot (a);
Subplot (212);p lot (d);
A3=wrcoef (' A ', d,a, ' DB5 ', 3);
D3=wrcoef (' d ', d,a, ' DB5 ', 3);
D2=wrcoef (' d ', d,a, ' DB5 ', 2);
D1=wrcoef (' d ', d,a, ' DB5 ', 1);
Subplot (411);p lot (A3);
Subplot (412);p lot (D3);
Subplot (413);p lot (D2);
Subplot (414);p lot (D1);