why dendrogram is not working?

3 ビュー (過去 30 日間)
huda nawaf
huda nawaf 2012 年 8 月 9 日
hi, i try use ward method for clustering:
X=[-0.4326 , -1.6656 , 0.1253 , 0.2877 , -1.1465 , 1.1909]';
Y=[1.1892 , -0.0376 , 0.3273 , 0.1746 , -0.1867 , 0.7258]';
%Form a matrix by combining x and y
input=[X,Y]
%Set up a series of labels for the points between A and F
labels={'A';'B';'C';'D';'E';'F'};
p=pdist(input,'euclidean')
%Given the distances, the Ward links between the points can be calculated:
L=linkage(p,'ward')
%Finally, we produce the dendrogram plot to show the links and add the labels:
dendrogram(L,labels)
%%%%%%%%%%%%%% when run it i got this error
??? Undefined function or method 'gt' for input arguments of type 'cell'.
Error in ==> dendrogram at 169
if (m > p) && (p ~= 0)
Error in ==> ward at 11
dendrogram(L,labels)
thanks

採用された回答

Matt Fig
Matt Fig 2012 年 8 月 9 日
dendrogram(L,0,'labels',labels)
  2 件のコメント
huda nawaf
huda nawaf 2012 年 8 月 9 日
many thanks
huda nawaf
huda nawaf 2012 年 8 月 13 日
hi, if I want to label big size of data . say 1000 values, what I ahve to do with labels?
thansk

サインインしてコメントする。

その他の回答 (0 件)

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by