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

2 次查看(过去 30 天)
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 个评论
Rafael Freire
Rafael Freire 2015-8-27
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...

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Performance and Memory 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by