Centroid of a Convex n-Dimensional Polyhedron
Version 1.0.0.0 (883 Bytes) by
Michael Kleder
Computes the center of gravity of a convex polyhedron in any number of dimensions.
5.4K Downloads
Updated
21 Sep 2005
No License
USAGE: C = centroid(P)
P = Matrix of convex polyhedron vertices: each row is a vertex, and each column is a dimension.
C = Row vector of centroid coordinates. Each column is a dimension.
Notes:
(1) This function computes the centroid by partitioning into simplices and determining the weighted sum of their centroids.
(2) Written in response to a question on comp.soft-sys.matlab
Michael Kleder, Sep 2005
Cite As
Michael Kleder (2026). Centroid of a Convex n-Dimensional Polyhedron (https://www.mathworks.com/matlabcentral/fileexchange/8514-centroid-of-a-convex-n-dimensional-polyhedron), MATLAB Central File Exchange. Retrieved .
MATLAB Release Compatibility
Created with
R14SP2
Compatible with any release
Platform Compatibility
Windows macOS LinuxCategories
Find more on Computational Geometry in Help Center and MATLAB Answers
Tags
Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
| Version | Published | Release Notes | |
|---|---|---|---|
| 1.0.0.0 |
