Hi,
I am trying to obtain all the unique combinations of two columns in a table. Lets say we have the following table:
year = {1994, 1994, 1994, 1995, 1995, 1995, 1996, 1996, 1996}.';type = {'AA', 'BB', 'CC', 'BB', 'BB', 'BB', 'AA', 'CC', 'CC'}.';t = table(year, type);
How can I extract the unique combinations of 'year' and 'type' in order to get something like this:
year = {1994, 1994, 1994, 1995, 1996, 1996}.';type = {'AA', 'BB', 'CC', 'BB', 'AA', 'CC'}.';answer = table(year, type);
Thank you
Best Answer