Hi, I got a dataset (1031×2 matrix) consisting of a bunch of datapoints for a profile, where the first column represents the x-axis, the second column the y-axis. I need the ten highest values in the y-axis and the corresponding x-values. I tried it via sorting but then I get the ten highest values for the x-axis as well, which of course, are not the corresponding values to the computed highest y-values…
Thanks in advance!
sortedFw = sort(footwall, 'descend'); % sort dataset descending
FwMax10 = sortedFw(1:10) ; % obtain 10 max values
n = sortedFw(10,:);FwMax10_detour = footwall;FwMax10_detour(FwMax10_detour<n)=NaN
Best Answer