How do I determine the wavelet coefficients in the Wavelet Toolbox 2.1 (R12.1)?

18 views (last 30 days)
How do I determine the wavelet coefficients in the Wavelet Toolbox 2.1 (R12.1)?
I am using APPCOEF and WAVEDEC, but I am not sure if these results are correct.
It seems that the coefficients which APPCOEF / WAVEDEC give are actually the reconstructed signal and the detail components at the required resolution. This is observed by the fact that these coefficients form a diminished version of the input signal. Is this correct?

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
The WAVEDEC function returns the wavelet decomposition which contains the wavelet decomposition vector C (coefficients) and the associated lengths of each vector, L:
[C,L] = wavedec(X,N,'wname')
[C,L] = wavedec(X,N,Lo_D,Hi_D)
where: X = signal
N = level
'wname' = specific wavelet
Lo_D = low pass wavelet decomposition filter
Hi_D = high pass wavelet decomposition filter
The APPCOEF function extracts approximation coefficients at a given level. For example, if you have the orthogonal decomposition:
Vj = Vj+1 + Wj+1 for any j
the Wavelet Toolbox, as in many software packages and theoritical papers, the projection on V0 and the components (coefficients) on the base of V0 are identified. We may also say that we "identify" a sampled signal and its components (coefficients) in V0.
This is a convenient but not "mathematically correct" statement. In fact you have two "mathematically correct" and equivalent points of view:
1) You work with the components in the Vj spaces, so the initial values are the components in V0 and not a sampled version of a signal.
2) You work with discrete signals and wavelets in l2(Z) (space of series).
About the statement, "This is observed by the fact that these coefficients form a diminished version of the input signal":
For a regular signal this is true for the approximation coefficients, but this is a consequence of two reasons:
1) the scale function has a mean average of 1.
2) the signal is regular so its mean is very similar. (The approximation is like a mean - up to a sqrt(2) noramalization). But for an irregular signal this is false.
For example try:
x = randn(1,200);
[a,d] = dwt(x,'db1');
subplot(3,1,1) ; plot(x,'k');
set(gca,'Xlim',[1,length(x)],'Ylim',[-2,2])
subplot(3,1,2) ; plot(a/sqrt(2),'r');
set(gca,'Xlim',[1,length(a)],'Ylim',[-2,2])
subplot(3,1,3) ;plot(d/sqrt(2),'b');
set(gca,'Xlim',[1,length(d)],'Ylim',[-2,2])

More Answers (0)

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!