Very interesting answer. Could you continue with the level 3 ?
For example, should the level 3 approximation be
In this case the length of the impulse response is 53, but It should be 50.
I am missing something :(
I also add one more question: Downsampling and then filtering by a filter having transfer function G(z) should be equal to filter by G(z^2). Therefore the second level low pass filter should have transfer function G(z)*G(z^2), no ? Similarly the second level high pass should have G(z)*H(z^2).
Therefore, I would be tempted to compute the transfer function at level 2 as follow:
[LoD,HiD] = wfilters('db4');
[Hl,Wl] = freqz(LoD);
[Hh,Wh] = freqz(HiD);
Now... this is giving a very different result from what you have proposed: where is the mistake ?