PlotClusters(Data,I​DX,Centers,Colors)

版本 2.0.2.0 (5.0 KB) 作者: Elad Kivelevitch
This function plots clustering data, for example the one provided by kmeans, if the data is 2d or 3d
1.8K 次下载
更新时间 2017/8/19

查看许可证

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 版本兼容性
创建方式 R2017a
兼容任何版本
平台兼容性
Windows macOS Linux
类别
Help CenterMATLAB Answers 中查找有关 Cluster Analysis and Anomaly Detection 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!
版本 已发布 发行说明
2.0.2.0

.

2.0.1.0

Smaller number of point in the example to show centers

2.0.0.0

Version 2 includes two main improvements:
1. Performance is improved per Arnobou's comment below.
2. Help improvements + added example of how to use the function.

1.0.0.0