Code covered by the BSD License  

Highlights from
Estimating the number of clusters via System Evolution

from Estimating the number of clusters via System Evolution by Kaijun Wang
estimate number of clusters for far clusters, small-larger clusters, slightly overlapping clusters

ind2cluster(labels)
function [clusters, newlabels] = ind2cluster(labels)

C = unique(labels);
newlabels = labels;
k = length(C);
clusters = cell(1,k);
for i = 1:k
  ind = find(labels==C(i));
  clusters{i} = ind;
  newlabels(ind) = i;
end

Contact us at files@mathworks.com