MathGroup Archive 1998

[Date Index] [Thread Index] [Author Index]

Search the Archive

sorting a Matrix



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


  • Prev by Date: RE: <<name failed
  • Next by Date: RE: test positive
  • Prev by thread: RE: <<name failed
  • Next by thread: Re: sorting a Matrix