title: corrcoef & xcorr differences
body: <p>I've two complex functions (size 1x1x2501) and i need to do a correlation between these (cross-correlation).</p>
  
  <p>I've tried to use this command:</p>
  
  <pre><code>r=corrcoef(Hmimo_tb(1,:)',Hmimo_tb1(1,:)','coeff');
  </code></pre>
  
  <p>Where <code>Hmimo_tb</code> and <code>Hmimo_tb1</code> are my two signals in which the only difference is the fact that they have been measured in different positions. The difference betweeen these two signals is max equal to 1.5e-13, so they are only affected by noise.</p>
  
  <p>I obtain as result:</p>
  
  <pre><code>ans =
  
  1.0000             1.0000 + 0.0000i
  1.0000 - 0.0000i   1.0000          
  </code></pre>
  
  <p>The function that I'm going to correlate are complex but the 0.0000i leave me some doubts....
  Another doubt is the fact that the the signals are not equal in fact as i've told before there is a difference of 1.5e-13 that is not reported on the secondary diagonal why?</p>
  
  <p>What are the difference between corrcoef and xcorr?</p>
  
  <hr>
  
  <p>yes this is true i've tried with:</p>
  
  <blockquote>
    <p>format long g</p>
  </blockquote>
  
  <p>and i've obtained as result this:</p>
  
  <p>Column 1</p>
  
  <pre><code>                      1                         
                        1 +  3.73593550274545e-11i
  </code></pre>
  
  <p>Column 2</p>
  
  <pre><code>                      1 -  3.73593550274545e-11i
                        1      
  </code></pre>
  
  <p>now how can i interpretate the small complex value?what does it represent? Thank you</p>