MATLAB: Location of 10 highest values maximumvalues Hi all, I have a 1×34 matrix. I want to find the location of the 10 largest values. So the output should be 1×10 and have values like 2,3,6 etc…… Thank you. Best Answer [bigvalues, bigidx] = sort(YourMatrix, 'descend');bigidx(1:10)However, this is not suitable if your values might not be unique. Also, if your values might include NaN then you need to decide whether for your purpose NaN are high or not. Related SolutionsMATLAB: Highest frequency Please try the mode function: x = mode(A);HTH. MATLAB: Repeated Values in matrix [uvals, ua, uc] = unique(xy(:,1));maxy = accumarray(uc(:), xy(:,2), [], @max);newarray = [uvals(:), maxy(:)]; Related QuestionText locationDuplicate values in arraySelecting the highest valueHow Detect duplicate value in each column and replace first value with zeroHow to find the Nth high number in a matrix APixel location to map location
Best Answer