I have following matrix.
A = 1 2 2 1 32 1 3 1 1
Where, first two columns are in principle are unique combinations. I would like to remove one column, either 1st or 2nd, and generate following matrix
B = 2 2 1 31 3 1 1
OR
B = 1 2 1 32 3 1 1
I tried using following
[G,ia,ic] = unique(A(:,1:2),'rows');uA = A(ia,:)
but it doesn't solve the problem and gives following solution
uA = 1 2 2 1 3 2 1 3 1 1
Best Answer