필터 지우기
필터 지우기

How to get the index from the biggest to the smallest values of array ?

조회 수: 5 (최근 30일)
Rahim Rahim
Rahim Rahim 2020년 11월 21일
답변: KSSV 2020년 11월 21일
Hello; if I have that array :
Rankig = [ 0.6229 , 0.6516 , 0.2036 , 0.0997 , 0.5986 , 0.5897 , 0.7667 , 0.4887]
I want to get the rank of each value, I mean, I want the results will be:
7.0000 2.0000 1.0000 5.0000 6.0000 8.0000 3.0000 4.0000
From the biggest to the smallest

답변 (1개)

KSSV
KSSV 2020년 11월 21일
Read about sort.
[val,idx] = sort(Ranking,'descend') ;

카테고리

Help CenterFile Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

제품


릴리스

R2018a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by