Find the center of gravity of an array

COG returns the coordinates of the center of gravity, in each dimension.


Updated 13 Dec 2014

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 (2023). 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

A typo under "summary" was corrected