Efficient Row comparison large dataset
이전 댓글 표시
I have 2 arrays: array 1 consists of 'a|b|c' rows and array 2 consist rows containing a string, for example 'ut'. Both arrays have a length of 200.000+ rows and have equal length.
From array 1, I need to filter values which have the same third value but a different first value for the same string in array 2.
for example: row 1: 'a|b|c' and 'x' row 2: 'f|g|c' and 'y' row 3: 'a|b|c' and 'y' row 4: 'd|e|c' and 'x'
In this situation i would like to delete row 4, because 'c' and 'x' are the same for both rows, but 'a' and 'd' are different. All other rows do not fit these demands and won't be deleted.
It is possible to write a for loop and compare each row separately, however this process takes days (I tested).
Any help would be greatly appreciated.
답변 (2개)
John D'Errico
2014년 11월 3일
0 개 추천
help unique
This will serve your needs perfectly, and very efficiently.
카테고리
도움말 센터 및 File Exchange에서 Cell Arrays에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!