title: Clap sound detection
body: <p><img src="https://i.stack.imgur.com/o8wf0.jpg" alt="enter image description here">I'd like to detect the number of claps in a given wav.file. Here's my first attempt. I can draw the spectogram but how can I print the number of claps in sound.
  my output should give me "One clap" or "Two claps".</p>
  
  <pre><code>hfile = 'one.wav';
  [y, Fs] = wavread(hfile);
  mono1 = mean(y,2);
  
  [S,F,T,P] = spectrogram(mono1,w,120,N,Fs);
  thresh_l=1000;
  thresh_h=10000000;
  % take the segment of P relating to your frequencies of interest
  P2 = P(F&gt;thresh_l&amp;F&lt;thresh_h,:); 
  %show the mean power in that band over time
  m = mean(P2);
  plot(T,m);
  </code></pre>