Filter löschen
Filter löschen

How can I get the values for the distances between samples in a HCA

2 Ansichten (letzte 30 Tage)
Rafael Freire
Rafael Freire am 27 Aug. 2015
Kommentiert: Rafael Freire am 27 Aug. 2015
Let´s consider we have the folowing HCA
data = randi(1000,10,30);
HCA_Number_of_Clusters=3;
dist = pdist(data, 'euclidean');
link = linkage(dist, 'ward');
clust = cluster(link, 'maxclust', HCA_Number_of_Clusters);
color = link(end-HCA_Number_of_Clusters+2,3)-eps;
for i=1:size(data,1)
names{i,1}=num2str(i);
end
figure,
[H, T, outperm]=dendrogram(link , 0,'labels',names , 'colorthreshold', color);
How can I get the values for the distances between samples. It can be a matrix with the distances between all samples or a vector with distance values for a specified sample for example sample 5. Thank you
  1 Kommentar
Rafael Freire
Rafael Freire am 27 Aug. 2015
How to create a vector with the distances from sample 1? like Sample 1 distance from Sample 1 is 0 Sample 1 distance from Sample 2 is 1800 Sample 1 distance from Sample 6 is 1800 Sample 1 distance from Sample 4 is 2400 Sample 1 distance from Sample 7 is 2400 and on...

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Kategorien

Mehr zu Performance and Memory finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by