sorting a Matrix
- To: mathgroup@smc.vnet.net
- Subject: [mg12221] sorting a Matrix
- From: Klamser@t-online.de (Klamser)
- Date: Fri, 1 May 1998 03:09:08 -0400
Hello,
with Sort[{a,f,e,s}] I can sort a Vector (a List). How can I sort a
Matrix??
In the Help I can find the Information: Sort[{33,76,2,6,17},#1>#2&]
For a Matrix I think it should work like this:
Sort[{33,76,2,6,17},#1[[#5,#3]]>#2[[#4,#3]]&]
where #3 is the column to be sorted for, and #5 and #4 are the different
Vectors in the Matrix.
Can somebody help me??
Yours sincerely, Peter Klamser