フィルターのクリア

How to create a frequency table using a list of string values

2 ビュー (過去 30 日間)
Diana Krupnik
Diana Krupnik 2018 年 12 月 6 日
コメント済み: Star Strider 2018 年 12 月 9 日
Hello,
I have a list of 6,057,936 string values, some are unique, many are repeated multiple times. I need to create a table that lists each unique string (likely 1,000-2,000), as well as the number of times this string occurs. Could anyone help me to do this in Matlab?
Thank you,
Diana

採用された回答

Star Strider
Star Strider 2018 年 12 月 6 日
I would use unique and accumarray. An example is given in the documentation section Count of Unique Elements (link).
  2 件のコメント
Diana Krupnik
Diana Krupnik 2018 年 12 月 9 日
This is a great idea, but for my dataset (text string array) accumarray was not working unfortunately. What did work was the summary function. It returned fields for categories (same result as unique) as well as counts.
Thanks again,
Diana
Star Strider
Star Strider 2018 年 12 月 9 日
As always, my pleasure.

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLogical についてさらに検索

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by