Analysis of graphs in matlab..how to find peaks of pyulear graph?

Hi..I am working on a small project in matlab which involved analysis of sound through a microphone. I have loaded my pre-recorded sample file into a variable called 'file' using the wavread function..and I plotted its pyulear graph. I want to write a program in which different actions take place depending upon the number of peaks in the pyulear graph.. How do i find the (number of) peaks in the graph?
One way I tried is by storing the pyulear graph in a variable called 'a' and then using the findpeaks() function... but if I use something like a= pyulear(...) and then say plot(a)..a completely different graph pops up.Why is that so? I am quite new to matlab. Can someone please help me? Thanks

Answers (1)

You need to get 2 outputs from pyulear to reproduce the graph as in:
[a,f] = pyulear(...);
semilogy(a,f)
calling pyulear() without arguments produces a plot scaled in dB, whereas plot(a) is scaled linearly

Asked:

on 13 Jul 2011

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!