User 3b6e12470b
16-09-2005 14:51:25
Hi there,
I have prepared code for forming dendrogram if a
cooccurance matrix is entered already.
But I am unable to get the correct heights for all the clusters in the
dendrogram
please help me in correcting the code
plz c the code
looking forward to ur guidance
Thanks
Nishant
SAMPLE CODE :-
clc
close all
A= [ 6 2 0 3 1 0 0 0 0;
2 6 4 2 0 1 0 0 0;0 4 6 0 1 1 0 0 0;3 2 0 6 1 0 3 1 0;1 0 1 1 6 3 1 0 3;0
1 1 0 3 6 0 1 5;0 0 0 3 1 0 6 4 0;0 0 0 1 0 1 4 6 2;0 0 0 0 3 5 0 2 6];
disp(A);
Y=pdist(A,'cityblock');
Z= linkage(Y,'average');
dendfigno=100+1;
figure(dendfigno);
[H,T] = dendrogram(Z,'colorthreshold','default');
c = cophenet(Z,Y)
I = inconsistent(Z)
I have prepared code for forming dendrogram if a
cooccurance matrix is entered already.
But I am unable to get the correct heights for all the clusters in the
dendrogram
please help me in correcting the code
plz c the code
looking forward to ur guidance
Thanks
Nishant
SAMPLE CODE :-
clc
close all
A= [ 6 2 0 3 1 0 0 0 0;
2 6 4 2 0 1 0 0 0;0 4 6 0 1 1 0 0 0;3 2 0 6 1 0 3 1 0;1 0 1 1 6 3 1 0 3;0
1 1 0 3 6 0 1 5;0 0 0 3 1 0 6 4 0;0 0 0 1 0 1 4 6 2;0 0 0 0 3 5 0 2 6];
disp(A);
Y=pdist(A,'cityblock');
Z= linkage(Y,'average');
dendfigno=100+1;
figure(dendfigno);
[H,T] = dendrogram(Z,'colorthreshold','default');
c = cophenet(Z,Y)
I = inconsistent(Z)