title: How to get correlation coefficients in matlab
body: <p>In every paper i read about encryption they like to show the correlation coefficients of their encrypted image by showing 3 values:
  Horizontal correlation coefficient .
  vertical correlation coefficient. 
  diagonal correlation coefficient .
   and they show these 3 values for  encrypted image and also for plain image(lena). 
  My question is how to do this in matlab ? and if there is no matlab function for it , what are the equation they are using to get those 3 values ?</p>
  
  <p>Table 2
  Correlation coefficients of two adjacent pixels in two images
  example:</p>
  
  <pre><code>           Plain-image        Ciphered image
  Horizontal 0.92401               0.01589
  Vertical   0.95612                 0.06538
  Diagonal   0.92659                 0.03231
  </code></pre>
  
  <p>Any lead would be helpful , thanks</p>