In a previous post, I have created a matrix
1 11 21 31 41 52 12 22 32 42 5
For each 2D grid point I calculate some number in the third column
1 1 101 2 391 3 241 4 71 5 412 1 692 2 732 3 1212 4 102 5 7
Then what I would like to do is to (1) choose the max of numbers in column 3 whose column 1 number is 1, 2, 3, 4,… and (2) also record the number of the second column for a row that the column 3 number is max. That is, I would like to create a matrix
1 5 412 3 1213 ..4 ..5 ..
Please advise.
Best Answer