how to find the count of unique values of a column in a array?

7 ビュー (過去 30 日間)
Suresh R
Suresh R 2021 年 11 月 3 日
コメント済み: Suresh R 2021 年 11 月 3 日
how to find the count of unique values of a column in a array?
eg. am having values like 5,10,15,20,25,30,35,40,45,50,55,60 which are repeated in one column of a array.
i need count of each elements in that column.

採用された回答

Adam
Adam 2021 年 11 月 3 日
doc histcounts
should give you the number of each of the elements in your array, so long as you parameterise it correctly if you have discrete values.
doc accumarray
should also work for this, probably more simply, although its syntax has often confused me in the past
  1 件のコメント
Suresh R
Suresh R 2021 年 11 月 3 日
how can i use this in for loop?

サインインしてコメントする。

その他の回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by