|
"Clement Lim" <clementlim@singnet.com.sg> wrote in message <h8tm2q$do4$1@fred.mathworks.com>...
> Hi, I did not have any other comands before the waterfall plots beside those listed above. Do I need to add in other stuff to achieve the results? pls advise. Tks for your prompt reply.
I believe Rune was referring to the 'arg' statement and the two calls to 'spectrogram' in the example code, not your code.
Try replacing your last line with something like:
%%%
[ff,ff,tt,pxx]=spectrogram(y, [], [], nfft, Fs);
arg={ff,tt,10*log10(abs([pxx.'])+eps)};
waterfall(arg{:});
%%%
Also, assuming the pxx value returned from spectrogram behaves something like power^2 (you should check in the help doc to see if this is true), the 10log10 in the 'arg' statement is giving you decibels, which is a conversion you probably should consider.
Note that I don't use these functions, so my interpretation/implementation could be completely wrong. When all else fails, read the help/doc.
--
|