Output size of discrete wavelet transform (dwt) - how can I change it

4 views (last 30 days)
I am using the following code for a wavelet decomposition
[swa,swd] = dwt(x,'bior3.1');
For an input vector x(64x1) I get output vectors of size (33x1). 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 32x1 then.
Is there any way I can make dwt return vectors of exactly half the size of the original vector?
Thank you very much!

Accepted Answer

Walter Roberson
Walter Roberson on 25 Jun 2015
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 .

More Answers (0)

Categories

Find more on Wavelet Toolbox in Help Center and File Exchange

Tags

Products

Community Treasure Hunt

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

Start Hunting!