A = [5;3;4;1;7;2]
[B, C] = sort(A, 'descend')
A =
5
3
4
1
7
2
B =
7
5
4
3
2
1
C =
5
1
3
2
6
4
C排序后对应的行号。
A = [5;3;4;1;7;2]
[B, C] = sort(A, 'descend')
A =
5
3
4
1
7
2
B =
7
5
4
3
2
1
C =
5
1
3
2
6
4
C排序后对应的行号。