I can not find important function
이전 댓글 표시
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
Oleg Komarov
2012년 8월 28일
Please, format your code: http://www.mathworks.com/matlabcentral/answers/13205-tutorial-how-to-format-your-question-with-markup
Oleg Komarov
2012년 8월 28일
@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.
huda nawaf
2012년 8월 28일
Oleg Komarov
2012년 8월 28일
편집: Oleg Komarov
2012년 8월 28일
@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
2012년 8월 28일
huda, you have not formatted the code in this post.
Jan
2012년 8월 29일
@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.
답변 (2개)
Oleg Komarov
2012년 8월 28일
0 개 추천
huda nawaf
2012년 8월 28일
편집: huda nawaf
2012년 8월 28일
댓글 수: 10
Oleg Komarov
2012년 8월 28일
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
2012년 8월 28일
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
2012년 8월 29일
huda nawaf
2012년 8월 29일
Walter Roberson
2012년 8월 29일
Huda, I refuse to keep trying to read your mind about what you want the output to look like!
Oleg Komarov
2012년 8월 29일
편집: Oleg Komarov
2012년 8월 29일
@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
2012년 8월 30일
편집: Oleg Komarov
2012년 8월 30일
Walter Roberson
2012년 8월 30일
What do you want the output to look like?
Oleg Komarov
2012년 8월 30일
As commented in your other post, with the similiarity matrix alone, all you can do is a dendrogram.
huda nawaf
2012년 8월 30일
편집: Walter Roberson
2012년 8월 30일
카테고리
도움말 센터 및 File Exchange에서 Graphics Performance에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!