When running the DWT function from the signal processing toolkit in R2016b, I get errors in my returned cA and cD variables. Why is this happening?

1 view (last 30 days)
Say I have a signal, 'x' = randn(32,1). When I run [cA cD] = dwt(x, 'wname') for a wavelet with 'wname' which has length greater than 2 (i.e. any other wavelet besides a haar) my cA and cD vectors return with more than n/2 elements (in this case, more than 16 elements each). Specifically, if I run [cA cD] = dwt(x, 'db2') my cA and cD vectors each return with 17 elements, and if I run [cA cD] = dwt(x, 'db4') cA and cD both return with 19 elements. So, it appears the greater the length of the wavelet I'm using, the greater number of elements in my returned cA and cD vectors, but the length of the wavelet should have no influence on the length of cA and cD (for a single level transform, they should both always have length = n/2). Does anyone know why this is happening?? Thanks!

Answers (0)

Categories

Find more on Discrete Multiresolution Analysis in Help Center and File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!