フィルターのクリア

Use K-mean to measure the center of mass. Is it Possible?

1 回表示 (過去 30 日間)
Senghour Mey
Senghour Mey 2022 年 6 月 7 日
回答済み: Gobiha Duraisamy 2022 年 6 月 10 日
Hello everyone,
Can we use K-mean in matlab to measure the center of mass? (16x10)
is it possible to find the center of mass?
can you write the code K-mean?

回答 (1 件)

Gobiha Duraisamy
Gobiha Duraisamy 2022 年 6 月 10 日
From the attached data file and the information that you have provided, I understand that you have a data matrix, say M of size 25952×10. You want to use K-means clustering to compute the center of mass and to return a matrix of dimension 16×10.
Refer the documentation of kmeans. This function performs K-means clustering of a given matrix.
In your case, you need 16 clusters. Thus, kmeans function is used as follows:
>> [idx,C]=kmeans(M,16)
where C is of size 16×10 and corresponds to the center of mass location of the 16 clusters.

Community Treasure Hunt

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

Start Hunting!

Translated by