How to index a sorted array with the actual array?

How to index a sorted array with the actual array?

댓글 수: 3

I don't understand.
I have an array, I want to sort that array and find index (location of the each element) of the sorted array elements in the actual array

댓글을 달려면 로그인하십시오.

 채택된 답변

Andrei Bobrov
Andrei Bobrov 2014년 12월 18일
a = rand(20,1);
[new,idx] = sort(a);

추가 답변 (0개)

카테고리

도움말 센터File Exchange에서 Shifting and Sorting Matrices에 대해 자세히 알아보기

태그

질문:

2014년 12월 18일

댓글:

2014년 12월 18일

Community Treasure Hunt

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

Start Hunting!

Translated by