I can not find important function
Mostrar comentarios más antiguos
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 comentarios
Oleg Komarov
el 28 de Ag. de 2012
Please, format your code: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
Oleg Komarov
el 28 de Ag. de 2012
@huda: I posted a link because there's a much easier facility to format the code.
After 130 and more question you still don't take the effort to watch (you don't even have to read) the .gif or to read some simple guidelines.
I second Oleg's impression. Please, huda, show some respect and care about the conventions in the forum. I you do not care about making the questions as easy to understand as possible, the forum will loose the interest in your questions also.
huda nawaf
el 28 de Ag. de 2012
Oleg Komarov
el 28 de Ag. de 2012
Editada: Oleg Komarov
el 28 de Ag. de 2012
@huda: I had a teacher of biology in high school who used to say "I cannot spread apologies on my bread (in the morning when having breakfast)".
In brief, this is not the first time I post the link on how to format the question or the other link on how to ask a question properly. Also, it is common sense to provide the necessary information if you expect a reasonable answer. Thus, saying "I am sorry" and still keeping to post the same way is equivalent to fool us around. Obviously, that's my point of view.
Walter Roberson
el 28 de Ag. de 2012
huda, you have not formatted the code in this post.
Jan
el 29 de Ag. de 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.
Respuestas (2)
Oleg Komarov
el 28 de Ag. de 2012
0 votos
huda nawaf
el 28 de Ag. de 2012
Editada: huda nawaf
el 28 de Ag. de 2012
10 comentarios
Oleg Komarov
el 28 de Ag. de 2012
One question per post and how am I supposed to know since you don't provide a test suite.
The general answer is, yes you can write alternative ways to see clusters graphically, example gscatter().
Walter Roberson
el 28 de Ag. de 2012
Alternate plotting methods were suggested to you at least a week ago, in one of the several other threads where you asked the same question.
huda nawaf
el 29 de Ag. de 2012
huda nawaf
el 29 de Ag. de 2012
Walter Roberson
el 29 de Ag. de 2012
Huda, I refuse to keep trying to read your mind about what you want the output to look like!
Oleg Komarov
el 29 de Ag. de 2012
Editada: Oleg Komarov
el 29 de Ag. de 2012
@huda: what if I told you that you can still use gscatter()?
(You have to read the sentence having the meme in mind)
I second Walter and I will repeat myself for the n-th time, read these guidelines http://www.mathworks.com/matlabcentral/answers/6200-tutorial-how-to-ask-a-question-on-answers-and-get-a-fast-answer, after that you will understand that
- One and only one question per post
- No duplicate posts
- If you can't get an answer, 99.9% of the times your question is wrong.
- Post example inputs and example output
- Use markup to format your question (especially the code)
"Olg, Gscatter creates a scatter plot of the vectors X and Y grouped by G. But I have similarity matrix with size n*n , and vector with size n show the cluster no. that each observation in similarity matrix belong to it."
So? I don't see the problem. The vector relates to each row instead of each element, repmat it, make the n by n matrix a vector and use gscatter().
huda nawaf
el 30 de Ag. de 2012
Editada: Oleg Komarov
el 30 de Ag. de 2012
Walter Roberson
el 30 de Ag. de 2012
What do you want the output to look like?
Oleg Komarov
el 30 de Ag. de 2012
As commented in your other post, with the similiarity matrix alone, all you can do is a dendrogram.
huda nawaf
el 30 de Ag. de 2012
Editada: Walter Roberson
el 30 de Ag. de 2012
Categorías
Más información sobre Graphics Performance en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!