title: Matlab divergence of a randomly sampled 3d vector field
body: <p>I am trying to use the <code>divergence</code> function in Matlab over a dataset which is not ordered. I have therefore the x, y, z positions of the origins of the vectors (3 columns) and the three components Fx, Fy, Fz of the vector field (3 columns), for a total of a 6 columns dataset, where the positions are random points in a 3d volume. How should I transform the data in order to be readable by <code>divergence</code>?</p>
  
  <p>I guess I should use <code>meshgrid</code> and generate an ordered grid associated to my original random points, but how should I deal with the vector field F?</p>