help-octave
[Top][All Lists]
Advanced

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

scalograms


From: Robert Leach
Subject: scalograms
Date: Wed, 18 Feb 2004 18:33:11 -0700

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:

PNG image



and here's the scalogram...


PNG image



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                                                 =
=====================================================================

reply via email to

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