MATLAB: How to select between duplicated non-integer values of a matrix

find duplicated non-integer

A= [10.01 5.02;15.20 6.01;14.05 7.12;14.05 5.14;13.5 9.11] I need to find equal number in first column and find the minimum of the corresponding second column. [14.05 5.12] Then create a new matrix as: B= [10.01 5;15.20 6;14.05 5;13.5 9]
But I cannot use “accumarray” as my values are not integer. Would you please guide me?

Best Answer

"But I cannot use “accumarray” as my values are not integer." So what?
[values, ~, subs] = unique(A(:, 1));
B = [values, accumarray(subs, A(:, 2), [], @min)]