Re: newbie question on sorting
- To: mathgroup at smc.vnet.net
- Subject: [mg26441] Re: [mg26420] newbie question on sorting
- From: BobHanlon at aol.com
- Date: Thu, 21 Dec 2000 01:51:42 -0500 (EST)
- Sender: owner-wri-mathgroup at wolfram.com
Table[Random[ Integer, {0, 100}], {j, 4}, {k, 3}] {{98, 34, 45}, {80, 50, 86}, {53, 30, 36}, {37, 3, 77}} Sort[%] {{37, 3, 77}, {53, 30, 36}, {80, 50, 86}, {98, 34, 45}} Bob Hanlon In a message dated 12/20/00 1:14:12 AM, niels.waller at home.com writes: >I have just started using Mathematica for a programming task and have run >into a difficulty. I have a matrix M. I would like to sort the rows of >M >based on the values of the first column. Is there any easy way to do this? >Any and all help will be greatly appreciated. >