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. Related SolutionsMATLAB: Detection of 3D blobs with flat surfaces Try convhulln() and extract any blob that has points on the convex hull. MATLAB: Triangle centroid Just average all the coordinates. For example, if you have a vector containing x coordinates and a vector containing y coordinates, you can find it in the following manner.x = rand(3,1); % x-coordinatey = rand(3,1); % y-coordinatex_centroid = mean(x);y_centroid = mean(y); Related QuestionHow to find the centroids and the angle between each of themCalculating centroidsPlotting centroid valuesHow can i plot a surface defined by scattered points within the convex hull of those points.
Best Answer