MATLAB: How to prioritize the cluster on the basis of number of data points in each cluster

clusterprioritizationStatistics and Machine Learning Toolbox

I want to assign a number to each cluster on the basis of data points in that.

Best Answer

If X was your data, you could get the histogram with
h = histogram(X);
and then compare the centroids of your clusters to h.BinEdges, and the corresponding h.Values will provide you with the count of each cluster's bin.