Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: vectorization problem part II
Date: Sat, 21 Nov 2009 15:03:03 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 27
Message-ID: <he8vf7$57i$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1258815783 5362 172.30.248.37 (21 Nov 2009 15:03:03 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sat, 21 Nov 2009 15:03:03 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 2037365
Xref: news.mathworks.com comp.soft-sys.matlab:586879


I've another problem that seems so simple but i can't figure it out. Well i can, but not in a fast way. I still have this matrix for example:

5  1
5  3
5  2
6  2.5
6  2.1
6  2.9
7  8
7  9
7  1

this matrix is ordered based on the first row. For all similar values in this first row i also want to order the values in de second row. So then you get this:

5  1
5  2
5  3
6  2.1
6  2.5
6  2.9
7  1
7  8
7  9

Looks so simple, i tried that with a combination of accumarray and sortrows..that didn't work though. Any smart people here that can help me? No more questions after this one..well maybe 1 :)

-NV-