Search All of the Math Forum:

Views expressed in these public forums are not endorsed by NCTM or The Math Forum.

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: time and frequency marginals in the wavelet scalogram and energy
Replies: 5   Last Post: Dec 11, 2013 7:24 PM

 Messages: [ Previous | Next ]
 Derek Goring Posts: 3,922 Registered: 12/7/04
Re: time and frequency marginals in the wavelet scalogram and energy
Posted: Dec 11, 2013 3:23 PM

On Thursday, December 12, 2013 4:18:06 AM UTC+13, palmar wrote:
> TideMan <mulgor@gmail.com> wrote in message <df595ab3-3e34-425e-bf0d-9029db106673@googlegroups.com>...
>

> > On Wednesday, December 11, 2013 1:54:20 PM UTC+13, palmar wrote:
>
> > > Hi there:
>
> > >
>
> > > I have been looking for some matlab code to compute the time and frequency marginals in the wavelet scalogram.
>
> > >
>
> > >
>
> > >
>
> > > Moreover I was trying to to verify the so-called total energy condition of the scalogram, basically the energy of the scalogram should match the energy of the signal.
>
> > >
>
> > >
>
> > >
>
> > > I have done a double integral of the scalogram and the result doesnt match the energy of the signal, so I should be doing something wrong since the result should be wavelet dependent, and we should take that in account when calculating the energy of the signal.
>
> > >
>
> > >
>
> > >
>
> > > integral(integral(P(f,t))= sum(norm(s(t)).^2)
>
> > >
>
> > >
>
> > >
>
> > > P(f,t)= scalogram and s(t) signal
>
> > >
>
> > >
>
> > >
>
> > > Time marginal:
>
> > >
>
> > > integral(P(f,t)df=|s(t)|.^2
>
> > >
>
> > > Frequency marginal
>
> > >
>
> > > integral(P(f,t)dt=|S(w)|.^2
>
> > >
>
> > > Any ideas?
>
> > >
>
> > > Thanks
>
> >
>
> > BTW
>
> > Why do you use:
>
> > integral(integral(P(f,t))= sum(norm(s(t)).^2)
>
> > and not
>
> > integral(integral(P(f,t))= var(s)
>
> > which is Parseval's Law.
>
>
>
> Many many thanks TideMan
>
>
>
> Regarding the above you are right. Point taken.
>
>
>
> the nice link you sent with the ever important Torrece´s paper is very good but I can´t find in there any mentiion to the marginals calcultaion.
>
>
>
> There is a matlab function in http://tftb.nongnu.org/ that does the marginals, incidentally only for the Cohen Class time-frequency representations, not scalograms I gather.
>
>
>
> Still looking!!

I'm afraid I don't know what you mean by "marginals", but one way to reconstitute the signal into a set of time series for each level of frequency (scale)is with this snippet of code:

scale=scale(:); % Make sure it's a column vector
denom=scale*ones(1,nt);
ywrecon=real(wave)./sqrt(denom);
ywrecon=ywrecon*sqrt(dt)*dj*factor;

where the variables are those in T&C's wavelet.m and factor is from Table 2 of their paper (dependent upon the mother wavelet).
Once you have this matrix, ywrecon(nt,nf), i.e. a time series for each frequency interval, you can do:
var(ywrecon)
to get the frequency spectrum, or
sum(var(ywrecon))
to get the total energy, or
sum(ywrecon,2)
to get s(t).

Date Subject Author
12/10/13 palmar
12/10/13 Derek Goring
12/10/13 Derek Goring
12/11/13 palmar
12/11/13 Derek Goring
12/11/13 palmar