I have to be able to remove all duplicates from each column of a matrix A = [1,2,3;1,3,3;4,2,1], while also not using unique and not changing the order.
I got the code to work for a single column, I'm just not sure how to do it for a matrix.
z = length(A);
Ab = zeros(size(A));
for i = 1:(z-1)
Ab(i) = sum(A(i) == A(i+1:end));
AA = A(Ab == 0);