Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to program Discrete Wavelet Transform in Matlab. I do understand that their are various libraries available, but my project requires that I must implement it from scratch.

I am taking a vector of length N. I then provide this vector as input to my my Low Pass and High Pass Filters. My first question is, what must be the cut-off for these two filters?

Once I am done passing my signal through these two filters, I have S_LowPass and S_HighPass. I now down sample these vectors.

Once I have down sampled these vectors, the size of my vector has been reduced. Now when I use Matlab's Wavelet toolbox, the sizes remain the same on each level. My second question: Why are the sizes remaining the same?

share|improve this question
Btw, you might try asking this question on (or rather asking for it to be migrated to) the DSP stackexchange site – paul Mar 15 '13 at 12:24
Thanks Paul, I am doing that. – user1343318 Mar 16 '13 at 9:21

From the Wikipedia article on the DWT, the filter pair has to satisfy the requirements of a quadrature mirror filter.

From what I remember from school when you had two analog filters cross you wanted the crossing point (frequency) to be at the 3dB rolloff of each, but it might be different for wavelets -- I don't rememba so good.

I believe the crossing frequency you'd want would be at 1/2 the maximum frequency of your signal (so a quarter of the Nyquist rate).

You might try these notes by Phil Schniter starting w/ section 3.

If you just wanna take the easy route there's a Java implementation using the Haar wavelet; I used a C version of it in this project.

As for the Wavelet toolbox part of the question, I've not used that.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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