Hello all:
I have a matrix as below. I want to build a new matrix based on maximum value at row 4 element. Here column 5 is the index matrix, column 1 is the year, column 2 is month and column 3 is date. I want to extract the row with maximum value in column 4. For example, the value with 2 in column 5 occurred twice. The respective values at column 4 are 50 and 100. I want to extract the row with value 100.
A=
1978 7 1 45 11978 7 11 50 21978 7 14 100 21978 7 23 120 31978 8 17 150 41978 8 23 130 51978 8 24 40 51978 8 25 200 5
Desired output B =
1978 7 1 45 11978 7 14 100 21978 7 23 120 31978 8 17 150 41978 8 25 200 5
Best Answer