title: Cross-correlation coefficient
body: <p>I have two waveforms in the time domain, of which I need to measure the <a href="http://en.wikipedia.org/wiki/Cross-correlation" rel="nofollow noreferrer">cross-correlation</a> coefficient in MATLAB. I have tried <code>max(abs(xcorr(m,n,'coeff')))</code> but it doesn't seem to be working properly.</p>
  
  <p>Also I need to measure the cross correlation coefficient for different sections of the waveform, e.g. measure the cross correlation coefficient at 1 minute intervals. And if possible output these values to a matrix or something.</p>
  
  <p>I know this is a lot to ask but I'm a MATLAB novice and find this task daunting!<br>
  Any help you could give me on any section of this question would be gratefully received.</p>
  
  <hr>
  
  <p><strong>EDIT:</strong>
  This is the code I used to test the correlation code:</p>
  
  <pre><code>x = rand(1,14400);
  y = rand(1,14400);
  r = max( abs(xcorr(x,y,'coeff')) )
  </code></pre>