[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: sort question
From: |
Gert Van den Eynde |
Subject: |
Re: sort question |
Date: |
Wed, 5 May 2004 09:11:19 +0200 |
User-agent: |
KMail/1.6.2 |
Hi,
Is it this what you're looking for:
octave:1> a = rand(4,1)
a =
0.37108
0.19230
0.63290
0.16427
octave:2> [b,idx] = sort(a)
b =
0.16427
0.19230
0.37108
0.63290
idx =
4
2
1
3
bye,
gert
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------