title: Expanding a 2D Matrix in Matlab with Interpolation
body: <p>Let's say I have a 4 pixel by 4 pixel image with values between 0 and 255 and I want to expand it to an 8-by-8 image, interpolating where necessary. I know how to interpolate a <em>vector</em> this way with interp1:</p>
  
  <p><code>interp1(linspace(0,1,numel(vector)), vector, linspace(0,1,newSize))</code></p>
  
  <p>But I'm unclear how to use interp2 to do the same thing for a <em>matrix</em>.</p>
  
  <p>EDIT: Would it be the same if I were to create a meshgrid after using linspace for each dimension?</p>
  
  <p>EDIT2: Yep, that worked. It's the same, but with a meshgrid.</p>