image thumbnail

Find the center of gravity of an array

version 1.1.0.0 (1.9 KB) by Noam Greenboim
COG returns the coordinates of the center of gravity, in each dimension.

1.3K Downloads

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 (2021). 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!