How to identify dulplicates and keep the one with maximum value

edited December 2015 in Matlab


I need to perform the following using MATLAB.

1) Identify duplicate years in 2nd column and keep the one with maximum value with the 3rd column.

For example, (see the image below) since I have two 1961 occurences in column 2, need to remove one 1961 which has a highest corresponsding value in 3rd column (keep row with 5430 and remove 1160)

How can I perform this in MATLAB. Any help is appreciated.


Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!