title: Isosurface from X,Y,Z,V ordered data in Matlab/Octave
body: <p>I have a set of 3d data points for each of which the value V of a certain quantity is associated. The data are organized in ordered columns X Y Z V, where the spatial coordinates are distributed on a grid. I have 21 points in every direction, so that the lengths of the several columns is 21x21x21=9261.  How can I transform the data into a meshgrid that can be used by <code>isosurface</code> in Octave/Matlab? My code is the following</p>
  
  <pre><code>a=load("data.txt");
  X=reshape(a(:,1), 21,21,21);
  Y=reshape(a(:,2), 21,21,21);
  Z=reshape(a(:,3), 21,21,21);
  V=reshape(a(:,2), 21,21,21);
  fv=isosurface (X,Y,Z,V,0.9);
  patch(fv)
  </code></pre>
  
  <p>But the result is not meaningful (i get two flat surfaces located at x=0.9 and 1.). The data can be downloaded <a href="http://cl.ly/text/2n3z430i1e12" rel="nofollow">here</a>.</p>