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

조회 수: 1 (최근 30일)
Rafael Freire
Rafael Freire 2015년 8월 27일
댓글: Rafael Freire 2015년 8월 27일
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