help-octave
[Top][All Lists]
Advanced

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

Re: spectrogram visualization (specgram() usage)


From: Paul Kienzle
Subject: Re: spectrogram visualization (specgram() usage)
Date: Thu, 5 Jul 2001 10:41:08 +0100
User-agent: Mutt/1.2.5i

Oops.  I didn't included my speech stuff when I built matcompat.  Sorry
for the reference to spectrogram().

This example works for me:
    x = chirp([0:0.001:2],0,2,500);  # freq. sweep from 0-500 over 2 sec.
    Fs=1000;                  # sampled every 0.001 sec so rate is 1 kHz
    step=ceil(20*Fs/1000);    # one spectral slice every 20 ms
    window=ceil(100*Fs/1000); # 100 ms data window
    specgram(x, 2^nextpow2(window), Fs, window, window-step);

Maybe you aren't able to plot images because you are missing a supporting
image viewer application?  Try:

    imagesc(ones(100,1)*sin(linspace(0,10*pi,100)));

which should give you 5 vertical stripes in a window.

I'm attaching spectrogram.m, which gives a brief introduction to
spectrograms.

Paul Kienzle
address@hidden


On Wed, Jul 04, 2001 at 04:18:53PM -0700, Aaron Brick wrote:
> hello all,
> 
> i don't understand how to use specgram(). when i follow the examples in its
> help, it doesn't yield anything, and its output can't be directly plotted.
> it says to also see "spectrogram", but i don't have it.
> 
> i would really like to better understand the algorithm behind this
> transform, as well as why it takes so many arguments. any insight is
> welcome!
> 
> thanks!
> 
> aaron.
>                            - | | | | | | | | | | -
>                            -                     -
>                            -                     -
>                            -     aaron brick     -
>                            -    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
> -------------------------------------------------------------
> 
> 

Attachment: spectrogram.m
Description: Text document


reply via email to

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