Code covered by the BSD License  

Highlights from
Recognizing Far-Near Relations of Clusters by GDEM, Visualization by Line-Pearl Pattern

image thumbnail
from Recognizing Far-Near Relations of Clusters by GDEM, Visualization by Line-Pearl Pattern by Kaijun Wang
measure far-near degrees (distances) between clusters & dense degrees of border regions of clusters

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

C = unique(labels);
newlabels = labels;
k = length(C);
clusters = cell(1,k);
Clength = zeros(1,k);

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

Contact us