compute centroid of a matrix
Show older comments
how to compute centroid of a matrix? is it possible?
Accepted Answer
More Answers (1)
David Lieberman
on 10 Aug 2017
0 votes
x = sum(sum(matrix).*(1:size(matrix,2)))/sum(sum(matrix))
y is computed similarly
Categories
Find more on Creating and Concatenating Matrices in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!