MATLAB: How to find which rows are identical in a matrix

matrix identical rows unique

Hey everybody!
If I have a matrix A=[1 1 1 1; 1 0 0 1; 1 0 0 1; 1 0 0 0]
"unique(A,'rows')"
will give A = [1 1 1 1; 1 0 0 1; 1 0 0 0]
But how to find out the row vector, [1 0 0 1] that has actually been removed?
This is just a sample example. Usually, I have higher dimensions matrices.
Thanks!

Best Answer

>> A = [1 1 1 1; 1 0 0 1; 1 0 0 1; 1 0 0 0];
>> [~,B,C] = unique(A,'rows');
>> A(B(accumarray(C,1)>1),:)
ans =
1 0 0 1