title: Subsample a XY meshgrid matrix
body: <p>I have a matrix of XYZ data, X and Y are in a regular "meshgrid format", I need to reduce the number of points by some factor. sample:</p>
  
  <pre><code>stepXY = 1;
  X = 1:stepXY:100;
  Y = 1:stepXY:80;
  
  [Xm,Ym] = meshgrid(X,Y);
  
  XYZ = [Xm(:) Ym(:)]';
  XYZ(3,:) = 7;
  </code></pre>
  
  <p>How to get a XYZ2 = XYZ as a step of 10 (in XY) instead of 1? I can't just get an element after each 10 steps becouse this you result in something like:</p>
  
  <pre><code>1 1  7
  1 10 7
  .
  .
  .
  2 1 7 &lt;==== look, X should be 10 here.
  </code></pre>