I have a data matrix like this:
A=[ 5 0 10 15 0.021;
5 0 15 20 0.011;
10 15 5 0 0.022;
15 20 5 0 0.009]
I need to compare each row with all of the other rows. The criteria is: If the 1st and 2nd column of this row is the same as the 3rd and 4th columns of the second row, and if the 3rd and 4th columns of the this row is the same as the 1st and 2nd column of the other row, I need the indices of these two rows.
For example:
A = [5 0 10 15 *;
* * * * *;
10 15 5 0 *;
* * * * *];
As you can see:
- 1st and 2nd element on row 1 are equal to 3rd and 4th of row 3
- 3rd and 4rd element on row 1 are equal to 1st and 2nd of row 3
I do not want change the order of my matrix.