Azzera filtri
Azzera filtri

I can not find important function

1 visualizzazione (ultimi 30 giorni)
huda nawaf
huda nawaf il 28 Ago 2012
hi, I found the following code of matlab in this link http://www.ideal.ece.utexas.edu/~gjun/ee379k/html/clustering/hac/page2.html
load c.txt;
P=pdist(c,'euclidean');
Z=linkage(P,'single');
T=cluster(Z,'MaxClust',2);
plot_clusters(c,T);
I tried it with my data , it is working except the last function , it is what I looked for , this function plot each cluster with different color
how can find it? please, i badly need it in my work.
thanks
  7 Commenti
Walter Roberson
Walter Roberson il 28 Ago 2012
huda, you have not formatted the code in this post.
Jan
Jan il 29 Ago 2012
@huda: Thanks for your apology. Apologies are not useful here, but improving your style to ask question is. Most of all this would be an advantage for me, the forum and last but not least for yourself.

Accedi per commentare.

Risposte (2)

Oleg Komarov
Oleg Komarov il 28 Ago 2012

huda nawaf
huda nawaf il 28 Ago 2012
Modificato: huda nawaf il 28 Ago 2012
Many thanks,
I got it and run it. But what if I ran the above code on my data but my data is not 2D , my data is n*n similarity matrix, and I ran the above function on my data
P=pdist(c,'euclidean');
Z=linkage(P,'single');
T=cluster(Z,'MaxClust',2);
and got T the label for each observations (n). Now , i want to use plot_clusters with this case . if plot_clusters is not working with this case, are there alternative way to see the clusters graphically.
thanks
  10 Commenti
Oleg Komarov
Oleg Komarov il 30 Ago 2012
As commented in your other post, with the similiarity matrix alone, all you can do is a dendrogram.
huda nawaf
huda nawaf il 30 Ago 2012
Modificato: Walter Roberson il 30 Ago 2012
Walter,
just need each cluster with differnt color and contain the number of objects inside it.
I sent image in that post. thanks

Accedi per commentare.

Categorie

Scopri di più su Creating and Concatenating Matrices in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by