How to index a sorted array with the actual array?

3 Kommentare

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

Melden Sie sich an, um zu kommentieren.

 Akzeptierte Antwort

Andrei Bobrov
Andrei Bobrov am 18 Dez. 2014
a = rand(20,1);
[new,idx] = sort(a);

Weitere Antworten (0)

Kategorien

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by