MATLAB: Eliminating rows that are exact duplicates (unique eliminates some desired combinations!)

matlab function

Hey there
If I have a matrix A = [-1 -1 0; -1 -1 0; 0 -1 -1; -1 0 -1] how do I eliminate the row that is an exact repetition of a row i.e I want to eliminate the row -1 -1 0 but keep all the other iterations of this: 0 -1 -1 and -1 0 -1 should remain in the matrix.
The unique function eliminates these other possibilities!
Thanks

Best Answer

unique(A,'rows','stable')