So it does look like you want to join the tables. join only works on two tables at a time so you'll have to use a loop: bigtable = join(yourcellarray{1}, yourcellarray{2});
for tidx = 3:numel(yourcellarray)
bigtable = join(bigtable, yourcellarray{tidx});
end
By default join will use all identical variable names to find which rows to merge and any row that has is not matched in the 2nd input table will be discarded, so the above is biased towards the first table in the cell array if there are unmatched rows. It may be you want innerjoin instead of join if you only want to keep only the rows that match all tables or outerjoin if you want all rows (non-matched columns will receive nan).
It may also be that you want to restrict the matching to only ID and Unit, in which case, you indeed use the key option:
join(A, B, 'Keys', {'ID', 'Unit'})
In which case you may indeed want to discard duplicates. Once again preference will be given to the 1st input. The option is indeed 'KeepOneCopy' but you have to enclose the list of names in a cell array:
join(A, B, 'KeepOneCopy', {Depth', 'Level', 'Time', 'FilamentID', 'Category'})
Best Answer