PlotClusters(Data,IDX,Centers,Colors)
This function takes clustering data and plots it, if the data is 2d or 3d. The inputs are:
An m-by-d matrix of data points, where d is the number of dimension and m the number of data points
An m-by-1 vector of indices that associate each data point with a cluster.
Optional inputs:
A c-by-d matrix with c cluster centers. If not given, the function calculates them.
A c-by-3 matrix of colors, as generated by the hsv command. The number of colors has to be no less than the number of clusters
Uses: plot/plot3
Note: this was only tested with version 2008a on Windows. Should work for all versions.
引用格式
Elad Kivelevitch (2024). PlotClusters(Data,IDX,Centers,Colors) (https://www.mathworks.com/matlabcentral/fileexchange/31710-plotclusters-data-idx-centers-colors), MATLAB Central File Exchange. 检索来源 .
MATLAB 版本兼容性
平台兼容性
Windows macOS Linux类别
- AI, Data Science, and Statistics > Statistics and Machine Learning Toolbox > Cluster Analysis and Anomaly Detection >
标签
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!