MATLAB: How to select the combinations without repetitions in a matrix

matrix sorting

Hi Everybody,
I have a question regarding matrix sorting. I have a matrix "A" a 6 by 2 matrix.
A=[
1 2
3 2
1 2
2 1
1 4
2 5];
As you can see row 1,3 and 4 have the same answer but inter changed numbers. How do we get matrix "B" without any combination repeats. Thank you

Best Answer

[ii,jj]=unique(sort(A,2),'rows','stable')
B=A(jj,:)