Re: Sorting tables by columns
- To: mathgroup at smc.vnet.net
- Subject: [mg6417] Re: Sorting tables by columns
- From: Dick Zacher <dick at loc3.tandem.com>
- Date: Tue, 18 Mar 1997 22:16:31 -0500 (EST)
- Organization: Tandem Computers
- Sender: owner-wri-mathgroup at wolfram.com
fbd2 at psu.edu wrote: > > Hi, > > Does anyone know how to sort tables by one of its columns? > Thanks, > > Flavio Flavio, This will do it: sortOnFirstColumn[matrix_]:=Sort[matrix,(First[#1]<=First[#2])&] -- ----------------------------- Dick Zacher Performance Engineering Dept., Tandem Computers zacher_dick at tandem.com phone: 408-285-5746 fax: 408-285-7079