title: PSNR of image using Matlab
body: <p>I want to find out PSNR and SNR values of two images A and B of same dimension in Matlab.I used the following code</p>
  
  <pre><code>[peaksnr, snr] = psnr(A,B)
  </code></pre>
  
  <p>and getting an error </p>
  
  <pre><code>Undefined function 'psnr' for input arguments of type 'uint8'.
  </code></pre>
  
  <p>Then I converted both the images into double as follows</p>
  
  <pre><code>A = double(A);
  B = double(B);  
  </code></pre>
  
  <p>and again PSNR is calculated.Now I'm getting an error</p>
  
  <pre><code>Undefined function 'psnr' for input arguments of type 'double'.
  </code></pre>
  
  <p>Why this is happening?Please help me to troubleshoot the error.</p>