Select common rows from two different arrays
1 view (last 30 days)
Show older comments
I have 161 different csv files, each csv file has about 20000 rows and 4 columns. I want to select the rows which have common first column elements and save them in a new array. Please help me how to progress with this problem.
2 Comments
Sven
on 13 Nov 2011
Do they need to be common to *all* 161 of your different files, or do you just want *any* row that exists in at least two of your files?
Sven
on 13 Nov 2011
Please make a very small example that shows what you want done. For example:
file1 = [1 3; 2 4; 3 3; 10 4];
file2 = [1 5; 1 6; 4 4; 12 5; 16 1];
file3 = [1 4; 10 4; 16 3];
If this was the contents of your file, what would you want your output to be?
Answers (0)
See Also
Categories
Find more on Software Development Tools in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!