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 Exchange에서 MATLAB에 대해 자세히 알아보기

제품

릴리스

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