MATLAB: Output size of discrete wavelet transform (dwt) – how can I change it

dwtwaveletWavelet Toolbox

I am using the following code for a wavelet decomposition
[swa,swd] = dwt(x,'bior3.1');
For an input vector x(64×1) I get output vectors of size (33×1). If I am understanding the wavelet theory right, the output should be a highpass- and lowpass-component which can be downsampled by a factor of 2. I should get output vectors of size 32×1 then.
Is there any way I can make dwt return vectors of exactly half the size of the original vector?
Thank you very much!

Best Answer

Your understanding turns out to be incorrect.
"Let lx = the length of X and lf = the length of the filters Lo_D and Hi_D; then length(cA) = length(cD) = la where la = ceil(lx/2), if the DWT extension mode is set to periodization. For the other extension modes, la = floor(lx+lf-1)/2."
The output length of 33 is explained by a filter length 3 or 4 when you are not using periodization. (64+3-1)/2 .
Related Question