help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: scalograms


From: Doug Stewart
Subject: Re: scalograms
Date: Wed, 18 Feb 2004 22:01:01 -0500
User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.5) Gecko/20031007

This is only a guess :-) but it looks like the spike is from the DC component of your input signal. It is mostly above 0. Find the average of the input signal and subtract it fron the input and see what the result is. Doug Stewart
Robert Leach wrote:

Hi,

I have another question. Please excuse me if it's a dumb one. I'm doing daubechies wavelet transforms and am trying to reproduce results in a paper to be sure I'm getting it right. The plots of my low frequency extractions look right-on to what the paper has, but my scalograms look nothing like those in the paper.

A point on a scalogram as I understand it is the sum of the coefficients at a particular 'level'. I figured out that I need to normalize the data, but all my plots have a spike going off the left side of the scalogram. Everything else is flat.

What could I be doing wrong?

Their y axis goes from 0 to 1, but mine varies. The one I'm looking at now goes from -4 to +4. I'm not sure I understand where those numbers are coming from. I'm using the same input signal as the paper. I assume they somehow recalculated the y axis markings. Do I need to convert my data like this? Does that matter to my scalogram? What difference does the y axis scale make if the low frequency plots look the same?

Here's some graphic examples:

This is my low frequency plot:


------------------------------------------------------------------------



and here's the scalogram...



------------------------------------------------------------------------



In the paper, they have a nice scalogram peak at 3.5 and a second smaller peak at 6. Plus their y axis goes to 150.

Here's the code I'm using to calculate the scalogram:

    function [s]=makescalogram(wc)

    sqscales = log(size(wc,2)) / log(2);
    scales   = floor(sqscales);

    s = zeros(1,scales);

    startscale = 1;
    starti = 1;
    sz = size(wc,2);
    sq = wc.^2;
    for curscale=startscale:scales
         endi = 2**(curscale);
         if(endi > sz)
              endi = sz
         end
         s(curscale) = (1/(2**curscale)) * sum(sq(starti:endi));
         starti = endi + 1;
    end


Rob

=====================================================================
= Robert W. Leach                                                   =
= Los Alamos National Lab                                           =
= Bioscience Division: Bioinformatics & Computational Biology Group =
= MS M888                                                           =
= Los Alamos, NM 87545                                              =
= address@hidden                                                 =
=====================================================================





-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------



reply via email to

[Prev in Thread] Current Thread [Next in Thread]