import 051107:distmatrixforbarrel.xls:Sheet6 into matlab by copy through clipboard first
then execute following program in matlab
A=clipboarddata;
for i=1:27,
mat1=A((i-1)*8+1:i*8,:);
val=[];
for k=1:8,
val=[val mat1(k,:)];
end
mat(i,:)=val;
end
P=pdist(mat,'euclid');
z1=linkage(P,'average');
h101=figure(1);
//close this window first then execute below;
dendrogram(z1);
l={'1bia' '1pdr' '1g3p' '1b34' '1whi' '1sty' '1bfg' '1i8d' '1efc' '1flm' '1fmt' '1eax' '1bco' '1e79' '1daz' '1ile' '2eng' '1h9d' '1mai' '1ieg' '1pkm' '1ik9' '1swu' '2cpl' '1jnp' '1c39' '1bia'};
hx=get(get(h101,'CurrentAxes'),'XTickLabel');
lab=[];
for i=1:size(hx,1)
hy(i)=str2num(hx(i,:));
lab=[lab,l(hy(i))];
end
set(get(h101,'CurrentAxes'),'XTickLabel',lab);
0 Comments:
Post a Comment
<< Home