Find the center of gravity of an array

COG returns the coordinates of the center of gravity, in each dimension.
1.4K Downloads
Updated Sat, 13 Dec 2014 22:36:55 +0000

View License

This function returns the coordinates of a vector, a matrix or a multi-dimensional array.
The coordinates can be defined by the user, or represent the location of the element in the matrix.

Cite As

Noam Greenboim (2024). Find the center of gravity of an array (https://www.mathworks.com/matlabcentral/fileexchange/48451-find-the-center-of-gravity-of-an-array), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2013a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
Version Published Release Notes
1.1.0.0

A typo under "summary" was corrected

1.0.0.0