A = [65 82 65 90; 90 70 72 82]; % Your data
range = 65:90;
res = [range; histc(A(:)', range)]'; % res has values in first column, counts in second.
Run Code Online (Sandbox Code Playgroud)
现在你所要做的就是res按第二列对数组进行排序,然后取前10行.
sortedres = sortrows(res, -2); % sort by second column, descending
first10 = sortedres(1:10, :)
Run Code Online (Sandbox Code Playgroud)