Data filtering large array

1 view (last 30 days)
Paul
Paul on 4 Nov 2014
Commented: Geoff Hayes on 4 Nov 2014
I need to filter data in a large dataset (300.000+). The column which needs filtering consists of values 'a|b' per row. There are a lot of the same 'a|b' values in the column, but not every combination has the same length (i.e. 'a|b' is 4x in the column, but 'c|b' is 9x in the column).
The first combination needs to stay, in this case 'a|b' and all other options with 'b' as second number needs to be deleted.
Example: Column: a|b, a|b, a|b, c|b, c|b, d|e, d|e, f|e, f|e, f|e.
The solution should be: a|b, a|b, a|b, d|e, d|e.
Any help would be greatly appreciated.
  1 Comment
Geoff Hayes
Geoff Hayes on 4 Nov 2014
Paul - you may want to attach a file that includes a subset of your data so that we can get a better idea of what its contents. When you stay that the not every combination has the same length, do you mean that some rows have four columns, and others have nine?

Sign in to comment.

Answers (0)

Community Treasure Hunt

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

Start Hunting!