In MATLAB, K-means clustering is performed by the kmeans() function; it partitions data into k mutually exclusive clusters and returns the index of the cluster to which it has assigned each object.
The objects and the centroid define a specific cluster in the partition. The centroid for each cluster is the point where the sum of distances from all objects in that cluster is minimized. K-means calculates the cluster centroid differently for each distance measure to minimize the sum of the specified measure. We can set different methods of calculating such distances as we can choose from different methods of minimizing such distances using different input parameters at kmeans function. This list summarizes the available ...