n =1 ;
for i = 1:length(A)
if A(i,1)> A(i,2)
B(n,1) = A(i,2);
B(n,2) = A(i,1);
n = n+1;
end
end
n =1;
for i = 1:length(A)
if A(i,1)< A(i,2)
C(n,1) = A(i,1);
C(n,2) = A(i,2);
n = n+1;
end
end
BB = unique((B), 'rows');
CC = unique((C), 'rows');
BBCC = [BB;CC];
D = unique(sortrows(BBCC), 'rows');
I solved it
thanks