From: Sean on
"Natalie Sin Hwee " <sin.ng09(a)imperial.ac.uk> wrote in message <i248bi$n9k$1(a)fred.mathworks.com>...
> Dear Mathwork users,
> I have a 6000x2 matrix:
>
> 1 88
> 1 67
> 2 31
> 2 30
> 2 88
> 2 65
> 3 31
> 3 61
> 3 71
> 3 79
>
> etc.
>
> and sometimes the rows will have 'mirrored' similarities
> eg.
>
> 1 88
>
> and further down...
> 88 1
>
> In this case, is there any suggestions to remove the second pair (i.e. 88 1) because they are practically the same from node1->88 and node 88->1
>
> ^^ thank you lots ^^
> Natalie :)

Another way:
>>A=[1 88; 3 16; 88 1; 72 4];
>>unique(sort(A,2),'rows','first')
 | 
Pages: 1
Prev: concatenate arrays
Next: strings with quotes