Prev: how to concisely choose the first element in a vector modifiedby a conditional statement?
Next: Find an element in a cell array
From: nor on 24 May 2010 11:34 I have a general question about padding a signal prior to applying wavelet transform to it. My question is: Is it really necessary to pad my signal to 2^n data points because in the wavelet toolbox, there is already a default symmetric padding? I am using discrete wavelet transform to analyze my signal. I have run a number of simulation to test the difference between default padding and manually padding my signal up to 2^n. And I found out that there is no apparent difference. By the way, both boundaries of my signal are pretty close to zero '0' values.
From: Wayne King on 25 May 2010 09:53 "nor " <nanadilla(a)yahoo.com> wrote in message <hte69d$kr0$1(a)fred.mathworks.com>... > I have a general question about padding a signal prior to applying wavelet transform to it. My question is: Is it really necessary to pad my signal to 2^n data points because in the wavelet toolbox, there is already a default symmetric padding? > I am using discrete wavelet transform to analyze my signal. I have run a number of simulation to test the difference between default padding and manually padding my signal up to 2^n. And I found out that there is no apparent difference. By the way, both boundaries of my signal are pretty close to zero '0' values. Hi Nor, You don't need to have a length 2^J signal to use the decimated wavelet transform in Matlab. You do need a length 2^J signal to use the stationary wavelet transform routine, swt(). However, if you wish to use an nondecimated wavelet transform, you can use ndwt() which does not require a length 2^J signal. Hope that helps, Wayne
From: TideMan on 25 May 2010 16:09
On May 25, 3:34 am, "nor " <nanadi...(a)yahoo.com> wrote: > I have a general question about padding a signal prior to applying wavelet transform to it. My question is: Is it really necessary to pad my signal to 2^n data points because in the wavelet toolbox, there is already a default symmetric padding? > I am using discrete wavelet transform to analyze my signal. I have run a number of simulation to test the difference between default padding and manually padding my signal up to 2^n. And I found out that there is no apparent difference. By the way, both boundaries of my signal are pretty close to zero '0' values. When using orthogonal wavelet decomposition, as a pre-processing step, I always remove a linear ramp to bring the ends to zero, then pad n/4 at each end with zeros (as Wayne has said, a dyadic number is not required). Some signals are prone to bad end effects, and the pre- processing tends to reduce those, though not always eliminating them. Of course, I reverse the process afterwards, adding the linear ramp back into the approximation and lopping n/4 data off the ends of the approximation and the details. |