enter image description hereI know that wavelet decomposition equals convolution followed by down sampling by two.I tried to test this on mat lab on haar wavelet. I write the below code and compared with the default wavedec command in mat lab. The code I wrote is shown below.

clear all
h=[0.7071    0.7071];% Haar scaling filter
g=[-0.7071    0.7071];%Haar wavelet filter
x=[1:10];% Input 
h=fliplr(h);% h(-m)
[a L]=wavedec(x,1,'haar') % for comparison

After running this program I get s = 0.7071 3.5355 6.3639 9.1923 12.0207 7.0710. d = 0.7071 0.7071 0.7071 0.7071 0.7071 -7.0710 and the wavedec out put as a = 2.1213 4.9497 7.7782 10.6066 13.4350 -0.7071 -0.7071 -0.7071 -0.7071 -0.7071. L = 5 5 10

I dont know why wavedec and my code gives different out puts, will any one help???

  • $\begingroup$ where did you read that, in which context? $\endgroup$ – Marcus Müller Aug 16 '16 at 14:16
  • $\begingroup$ In every context filtering corresponds to convolution. $\endgroup$ – Abhishek Aug 16 '16 at 14:41
  • $\begingroup$ true, but still, this is definitely (and trivially to counter-prove by convolving with $\delta(t)$) not the case for every filter. and hence, you're missing an important part of the original description. And hence, I ask for context. $\endgroup$ – Marcus Müller Aug 16 '16 at 14:45
  • $\begingroup$ In case of Discrete wavelet transform, high pass and low pass coefficients at each level are obtained with the convolution of the corresponding filter coefficients followed by down sampling.. for details please go to matlab website ,(following link and go to more about section) in.mathworks.com/help/wavelet/ref/wavedec.html $\endgroup$ – Abhishek Aug 16 '16 at 14:53
  • $\begingroup$ in.mathworks.com/help/wavelet/ref/wavedec.html $\endgroup$ – Abhishek Aug 16 '16 at 15:01

Simply put, no!

I know that wavelet decomposition equals convolution followed by down sampling by two

No again. Some linear wavelet decompositions can be turned into a cascade of convolutions followed by downsampling. But wavelets are much more general. Their discrete implementations involve intricate properties in filters, downsampling, and levels.

If you just filter a signal by some filter, and downsample, in general, you get almost nothing but aliasing.


I found out it, downsample command in matlab takes first element then 3rd,5th etc where downsampling in wavedec starts from 2,4,6...more over fliping of wavelet filters are not required ..Instead of using downsample command we can repalce with s=s(2:2:length(s))

  • $\begingroup$ Classical, for each level of DWT, you have two options: delete every odd or every even sample $\endgroup$ – Laurent Duval Aug 16 '16 at 19:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.