Path: news.mathworks.com!newsfeed-00.mathworks.com!nlpi057.nbdc.sbc.com!prodigy.net!news.glorb.com!postnews.google.com!g3g2000pre.googlegroups.com!not-for-mail
From: Michael <michael.j.krause@gmail.com>
Newsgroups: comp.soft-sys.matlab
Subject: sorting array with re-occuring values
Date: Wed, 18 Feb 2009 16:12:07 -0800 (PST)
Organization: http://groups.google.com
Lines: 16
Message-ID: <09fd2fcb-3a08-414a-872a-7578408ea0cf@g3g2000pre.googlegroups.com>
NNTP-Posting-Host: 63.193.205.1
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1235002327 9385 127.0.0.1 (19 Feb 2009 00:12:07 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 19 Feb 2009 00:12:07 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: g3g2000pre.googlegroups.com; posting-host=63.193.205.1; 
	posting-account=onjV8goAAABhFDzsRRtZ6vrubLrhpq0C
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 
	1.1.4322; .NET CLR 2.0.50727; InfoPath.1),gzip(gfe),gzip(gfe)
Xref: news.mathworks.com comp.soft-sys.matlab:519285

Suppose:

>> I=[3     7    10     8     4     5     9     5     8     2]

Does anyone know a quick solution how I can use "I" as an index (same
number of elements as "I", first element is "1", and no re-occurring
values)?

That array I want should be look like this:

>>iWant
   = 2     6     10     7     3     4     9     5     8     1

Thanks a lot!

-Michael