Applying k means to matrix
이전 댓글 표시
I have the result after dividing same pixels into blocks,
result is in variable out in workspace
27 [1,9]
30 [1,12]
31 [1,13]
32 [1,14]
33 [1,15]
34 [1,16]
35 [1,17]
36 [1,18]
37 [1,19]
38 [1,20]
39 [1,21]
now i have to apply k means for the above result ,i.e for each block i have to apply k means
please help
댓글 수: 11
Walter Roberson
2012년 11월 27일
Okay, go ahead. The function name is kmeans()
Pat
2012년 11월 27일
Walter Roberson
2012년 11월 27일
You are overwriting "f" on each iteration of the loop.
What do the arguments "2" and "z2(i)" represent to you?
Pat
2012년 11월 27일
편집: Walter Roberson
2012년 11월 27일
Pat
2012년 11월 27일
Walter Roberson
2012년 11월 27일
I don't understand what that code is intended to do, and I do not understand how you ended up (in your file) with multiple entries with the same pixel value.
Anyhow, let us stick for the moment with the question of what kmeans(2,z2(i)) means to you. Why is the first argument always 2? Why is the second argument variable? Which argument represents the number of clusters? Which argument represents the data to be clustered?
Pat
2012년 11월 27일
Walter Roberson
2012년 11월 27일
Time for you to re-read the documentation for kmeans to see what arguments it expects to be passed in.
Pat
2012년 11월 27일
Walter Roberson
2012년 11월 27일
Okay, so what is your current version of the code (after taking the documentation into account) ?
Pat
2012년 11월 27일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 k-Means and k-Medoids Clustering에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!