title: Padding an image in MATLAB
body: <p>I have an image of size 61x56 and I want to pad the image to size 392x392.</p>
  
  <p>I am trying to use <code>padarray</code> but since I get a non-integer value I am unable to do this. Can anyone help me with this. Thanks a lot! I have attached what I want to do below.</p>
  
  <pre><code>K = imread('test.jpg');
  K = rgb2gray(K);
  [m n] = size(K);
  p = 392;
  q = 392;
  K_pad = padarray(K, [(p-m)/2 (q-n)/2], 'replicate');
  </code></pre>