idx = kmeans(X,k) performs k-means clustering to partition the
observations of the n-by-p data matrix X into k clusters, and
returns an n-by-1 vector (idx) containing cluster indices of
each observation.
Rows of X correspond to points and columns correspond to variables.
Train a k-Means Clustering Algorithm
Cluster data using k-means clustering, then plot the cluster
regions.
Load Fisher's iris data set. Use the petal lengths and widths as
predictors