MATLAB: Volume from 3d point

stockpiletriangulationvolume

Hi there,
I am trying to calculate the volume of a stockpile using 3d points gathered.
First I created three matrices. X, Y and Z
Here's the simple code used
tri = delaunay(X,Y,Z);
h = trisurf(tri, X, Y, Z);
Now I'm stuck on calculating volume. Could you kindly assist.
Thanks

Best Answer

You'll get the volume of the convex hull by
[~,V] = convhull(X,Y,Z)