Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: simple return parameter issue
Date: Thu, 9 Apr 2009 03:12:04 +0000 (UTC)
Organization: Battelle Energy Alliance (INL)
Lines: 6
Message-ID: <grjp24$itp$1@fred.mathworks.com>
References: <grjnj6$dn6$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1239246724 19385 172.30.248.38 (9 Apr 2009 03:12:04 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 9 Apr 2009 03:12:04 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 688530
Xref: news.mathworks.com comp.soft-sys.matlab:531555

Do you see a difference here:

A = randperm(10);
% Now call the sort function.
B = sort(A)  % Return the sorted matrix 
[B,ind] = sort(A) % Return the sorted matrix and the index