On Saturday, 24 January 2015 19:00:14 UTC-5, [email protected] wrote:
>
> See the sort functionality in Matlab; the fourth usage case [B,I] = sort(
> ___)
>
> http://www.mathworks.com/help/matlab/ref/sort.html#bt83dd_-1
>
> Is there a julia version or julia way?
>

sortperm seems to do approximately what you want: 
http://julia.readthedocs.org/en/latest/stdlib/sort/#Base.sortperm 

But it doesn't return a copy of the array, sorted, so you have to do "i = 
sortperm(x); y = x[i]". Or you can use sortperm! to sort in-place.

Reply via email to