finding repeated values of two columns data?

6 Ansichten (letzte 30 Tage)
rajesh kumar
rajesh kumar am 30 Mai 2020
Beantwortet: madhan ravi am 30 Mai 2020
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

Akzeptierte Antwort

madhan ravi
madhan ravi am 30 Mai 2020
No loops needed:
[Rows,~,c]= unique(ex,'rows');
Counts = accumarray(c,1);
Wanted = [table(Rows),table(Counts)]

Weitere Antworten (1)

Sai Sri Pathuri
Sai Sri Pathuri am 30 Mai 2020
This answer may help
However, they checked only for one row, you may use a loop to check for all rows

Kategorien

Mehr zu Get Started with MATLAB finden Sie in Help Center und File Exchange

Tags

Produkte


Version

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by