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!