finding repeated values of two columns data?

Finding the repeated values
ex: 1 3
2 4
1 5
1 3
3 1
4 5
6 8
7 0
1 3
4 5
in the above 1 3 repeated 3 times and 4 5 repeated twice
my question how to find repeated values of two column values in matlab any body please suggest me

 採用された回答

madhan ravi
madhan ravi 2020 年 5 月 30 日

0 投票

No loops needed:
[Rows,~,c]= unique(ex,'rows');
Counts = accumarray(c,1);
Wanted = [table(Rows),table(Counts)]

その他の回答 (1 件)

Sai Sri Pathuri
Sai Sri Pathuri 2020 年 5 月 30 日

0 投票

This answer may help
However, they checked only for one row, you may use a loop to check for all rows

カテゴリ

ヘルプ センター および File ExchangeEntering Commands についてさらに検索

製品

リリース

R2016a

タグ

質問済み:

2020 年 5 月 30 日

回答済み:

2020 年 5 月 30 日

Community Treasure Hunt

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

Start Hunting!

Translated by