MATLAB: How to find centroid or center of a 3D irregular shape

3dcentroid

I would like find the centroid or center of a 3D irregular shape from its data set of x,y,z coordinates. How do i go about it?

Best Answer

The centroid is defined as the arithmetic mean of the points, so just do that in each (x,y,z) dimension.