Ranking values - sorting into descending order
이전 댓글 표시
I have a that for each row (i) ranks the column values. However, it ranks them in the ascending order. I require it to be ranked in descending order. Can anyone help with modifying the below code block to descending order?
for i = 1:height(d)
[temp, ranked] = ismember(X(i,:),unique(X(i,:)));
rnkR1List(i,:) = ranked;
end
채택된 답변
추가 답변 (1개)
Yazan
2021년 7월 24일
X = randn(10, 10);
Xranked = sort(X, 2, 'descend');
카테고리
도움말 센터 및 File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!