I have a matrix
A=[1 2 3; 2 4 6; 5 3 2; 8 5 4; 6 7 8]
from this matrix, i want that value in first and second column will not get repeated. For eg. in 1st row 2 is in second column and in second row 2 is in 1st column. Please tell me how we can compare these two rows based on first two column and can get only that row whose value in the third column is greater.
Eg:
Output = [ 2 4 6; 8 5 4; 6 7 8]
Only two column (1, 2) will be compared to get the value from third column.
Best Answer