title: Calculate the volume under a gridded surface in Matlab
body: <p>I have a non-uniformly spaced x,y,z data (Eastings, Nothings and thickness) which I have gridded and plotted as a surface using <code>meshgrid</code>, <code>griddata</code> and <code>surf</code>.</p>
  
  <p>I would like to calculate the volume under this surface but I'm struggling to apply other answers to this question to my dataset and code in question (I am a complete Matlab beginner). </p>
  
  <p>Any ideas how to do this (on Matlab version 2011b)? Thanks in advance.</p>
  
  <pre><code>load E.txt, load N.txt, load Z.txt;
  [xi, yi] = meshgrid(25.351639:0.00025:25.426483, 36.363799:0.0005:36.458845);
  zi = griddata(E,N,Z, xi,yi, 'linear');
  surf(xi,yi,zi)
  </code></pre>