Center of mass or clusters
1 view (last 30 days)
Show older comments
Hi there!
If I have an NxM matrix and a number of clusters, how do I return a centroids point vector representing the averages (centers of mass) of the clusters?
0 Comments
Answers (1)
Image Analyst
on 11 Apr 2020
It's returned by the kmeans() function as the second output argument:
[indexes, clusterCentroids] = kmeans(data, numberOfClusters);
0 Comments
See Also
Categories
Find more on Statistics and Machine Learning Toolbox 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!