Thread Subject: need help with wavedec and wfilters

Subject: need help with wavedec and wfilters

From: Adham

Date: 4 Sep, 2010 13:33:07

Message: 1 of 4

Hi, I am using following code for wavelet transform on a EEG data (trying to convert my voltage data to time-frequency domain). The problem is that I need to use this function for mother-wavelets such as 'gaus', 'morl', 'mexh',
'cgau','shan',and 'cmor' but wfilters does not work on these mother wavelets.

ts=squeeze(data(:));
[Lo_D,Hi_D,Lo_R,Hi_R]=wfilters(mother_wavelet);
[cx,lx]=wavedec(ts,level,Lo_D,Hi_D);
[H]=detcoef(cx,lx,level);

can anyone advise me about this?

Subject: need help with wavedec and wfilters

From: TideMan

Date: 4 Sep, 2010 23:44:16

Message: 2 of 4

On Sep 5, 1:33 am, "Adham " <adham.aty...@flinders.edu.au> wrote:
> Hi, I am using following code for wavelet transform on a EEG data (trying to convert my voltage data to time-frequency domain). The problem is that I need to use this function for mother-wavelets such as 'gaus', 'morl', 'mexh',
> 'cgau','shan',and 'cmor' but wfilters does not work on these mother wavelets.
>
> ts=squeeze(data(:));
> [Lo_D,Hi_D,Lo_R,Hi_R]=wfilters(mother_wavelet);
> [cx,lx]=wavedec(ts,level,Lo_D,Hi_D);
> [H]=detcoef(cx,lx,level);
>
> can anyone advise me about this?

You need to read up the difference between continuous and discrete
wavelets.
Your code is using discrete wavelet decomposition, but the mother
wavelets you "need to use" are for continuous decomposition.
For the life of me, I'm cannot figure out why you "need" to to use
these particular mother wavelets.
Just use 'dbx' where x is a number between 1 to 20.
They will do it for you.

Subject: need help with wavedec and wfilters

From: Wayne King

Date: 5 Sep, 2010 11:51:05

Message: 3 of 4

"Adham " <adham.atyabi@flinders.edu.au> wrote in message <i5thqj$1fu$1@fred.mathworks.com>...
> Hi, I am using following code for wavelet transform on a EEG data (trying to convert my voltage data to time-frequency domain). The problem is that I need to use this function for mother-wavelets such as 'gaus', 'morl', 'mexh',
> 'cgau','shan',and 'cmor' but wfilters does not work on these mother wavelets.
>
> ts=squeeze(data(:));
> [Lo_D,Hi_D,Lo_R,Hi_R]=wfilters(mother_wavelet);
> [cx,lx]=wavedec(ts,level,Lo_D,Hi_D);
> [H]=detcoef(cx,lx,level);
>
> can anyone advise me about this?

Hi Adham, Tideman's exactly right. If you enter:

waveinfo('db')

vs.

waveinfo('morl')

You can see whether a wavelet family is supported by the DWT. You can always obtain the CWT coefficients by scale by extracting rows from the coefficient matrix returned by cwt().

Wayne

Subject: need help with wavedec and wfilters

From: Adham

Date: 6 Sep, 2010 00:06:05

Message: 4 of 4

"Wayne King" <wmkingty@gmail.com> wrote in message <i60078$npc$1@fred.mathworks.com>...
> "Adham " <adham.atyabi@flinders.edu.au> wrote in message <i5thqj$1fu$1@fred.mathworks.com>...
> > Hi, I am using following code for wavelet transform on a EEG data (trying to convert my voltage data to time-frequency domain). The problem is that I need to use this function for mother-wavelets such as 'gaus', 'morl', 'mexh',
> > 'cgau','shan',and 'cmor' but wfilters does not work on these mother wavelets.
> >
> > ts=squeeze(data(:));
> > [Lo_D,Hi_D,Lo_R,Hi_R]=wfilters(mother_wavelet);
> > [cx,lx]=wavedec(ts,level,Lo_D,Hi_D);
> > [H]=detcoef(cx,lx,level);
> >
> > can anyone advise me about this?
>
> Hi Adham, Tideman's exactly right. If you enter:
>
> waveinfo('db')
>
> vs.
>
> waveinfo('morl')
>
> You can see whether a wavelet family is supported by the DWT. You can always obtain the CWT coefficients by scale by extracting rows from the coefficient matrix returned by cwt().
>
> Wayne

Thanks for the info. The reason for not using db wavelet is that in EEG db is used to detect spike which appears in event related tasks specifically with p300. However, in my situation, I need to extract my features from the data using WT with different mother wavelets and later on, fuse them together and send the result to a classifier. This will help me to cover a wider range of tasks with my system. About CWT, I already tried that, the problem is the output size. assume that I have a matrix of 60(channel)*50(time)*1400(epoch) as my data, and my sample rate is 100hz and the scale of interest is [0 100], the output of CWT would be 60(channel)*50(time)*100(frequency)*1400(epoch) which is around 6Gb. I simply don't have enough memory. is there any other way?

Adham

Tags for this Thread

Add a New Tag:

Separated by commas
Ex.: root locus, bode

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

rssFeed for this Thread

Contact us at files@mathworks.com