Path: news.mathworks.com!not-for-mail
From: "Clement Lim" <clementlim@singnet.com.sg>
Newsgroups: comp.soft-sys.matlab
Subject: Re: how to create waterfall plot
Date: Sat, 29 Aug 2009 15:22:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 29
Message-ID: <h7bh2r$3ig$1@fred.mathworks.com>
References: <h7be53$kjl$1@fred.mathworks.com> <h7berj$atl$1@fred.mathworks.com> <h7bg8j$afj$1@fred.mathworks.com>
Reply-To: "Clement Lim" <clementlim@singnet.com.sg>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1251559323 3664 172.30.248.37 (29 Aug 2009 15:22:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 29 Aug 2009 15:22:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1941466
Xref: news.mathworks.com comp.soft-sys.matlab:566957


"us " <us@neurol.unizh.ch> wrote in message <h7bg8j$afj$1@fred.mathworks.com>...
> "us "
> > > I would like to modify the code so that it can analyse and plot the music file both from .wav and from a music cd. Furthermore, I would also like to show a waterfall plot of the spectrogram. Can anyone help me or provide me with an example?
> > > 
> > > Thanks a million!
> > 
> > a hint:
> > 
> >      help waterfall;
> 
> sorry, forgot the ...example... part...
> 
>      d=load('chirp');
>      [ff,ff,tt,pxx]=spectrogram(d.y);
>      subplot(2,1,1);
>      spectrogram(d.y);
>      subplot(2,1,2);
>      arg={ff,tt,10*log10(abs([pxx.'])+eps)};
>      waterfall(arg{:});
>      colormap(jet(256));
> 
> us

Hi us,

Tks for the prompt reply. However the above code does not allow me to analyse in term of a music cd. That mean, I would like the script to prompt the user to input in the file to analyse. Currently, my original code is only able to analyse .wav files. However, it wont work for .wma file. 
Furthermore, it is possible for the waterfall plot to animate as a function of time when the music is being play?

Pls advise tks.