Sign in

username or email:

password:



Not a member?
Forgot your password?

Search matlab



Search tips

Subscribe to matlab



Ads

Discussion Groups

See Also

Embedded SystemsFPGA

Discussion Groups | Matlab DSP | Error using waverec when dwtmode set to 'per'

Hello,I have a question regarding the wavelet decomposition and reconstruction using the functions wavedec and waverec.I get an error during the reconstruction process when I set the dwtmode option to 'per'...

  

Post a new Thread



Is this thread worth a thumbs up?

0

Error using waverec when dwtmode set to 'per' - MAST...@UWALUMNI.COM - Dec 13 10:09:39 2006

Hello,
I have a question regarding the wavelet decomposition and reconstruction using
the functions wavedec and waverec.
I get an error during the reconstruction process when I set the dwtmode option
to 'per'.

The code I use is as follows:
-----------------------------------
dwtmode('per')
x = random('unif', 0, 1, 512, 1);
[y, L] = wavedec(x, 9, 'db2');
x_rec = waverec(y, L, 'db2');
-----------------------------------

Error messages:
-----------------------------------
??? Error using ==> plus
Matrix dimensions must agree.

Error in ==> idwt at 84
x = upsconv1(a,Lo_R,lx,dwtEXTM,shift) + upsconv1(d,Hi_R,lx,dwtEXTM,shift);

Error in ==> appcoef at 54
    a = idwt(a,d,Lo_R,Hi_R,l(imax-p));

Error in ==> waverec at 30
x = appcoef(c,l,varargin{:},0);
-----------------------------------

In the help for dwtmode it says that the dwtmode option applies to all processes
using dwt and idwt (which would include wavedec and waverec), according to the
following lines:

"All functions and GUI tools that use the DWT (1-D & 2-D) or
Wavelet Packet (1-D & 2-D) use the specified DWT extension mode."

Note that this error does not occur if the dwtmode option is set to 'sym', but I
need to use the 'per' mode in my application.

Thanks for any help on how to go around this error.
Daniel
______________________________
New Code Sharing Section now Live on DSPRelated.com. Learn about the Reward Program for Contributors here.



(You need to be a member of matlab -- send a blank email to matlab-subscribe@yahoogroups.com )