title: Interpolating irregularly spaced 3D matrix in matlab
body: <p>I have a time series of temperature profiles that I want to interpolate, I want to ask how to do this if my data is irregularly spaced. </p>
  
  <p>Here are the specifics of the matrix: </p>
  
  <ul>
  <li>The temperature is 30x365</li>
  <li>The time is 1x365</li>
  <li>Depth is 30x1</li>
  </ul>
  
  <p>Both time and depth are irregularly spaced. I want to ask how I can interpolate them into a regular grid?</p>
  
  <p>I have looked at <code>interp2</code> and <code>TriScatteredInterp</code> in Matlab, however the problem are the following:</p>
  
  <ol>
  <li><code>interp2</code> works only if data is in a regular grid.</li>
  <li><code>TriscatteredInterp</code> works only if the vectors are column vectors. Although time and depth are both column vectors, temperature is not. </li>
  </ol>
  
  <p>Thanks.</p>