Services & Resources / Wolfram Forums
MathGroup Archive
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2005

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

Search the Archive

Re: Sort problem

  • To: mathgroup at
  • Subject: [mg56360] Re: Sort problem
  • From: Bill Rowe <readnewsciv at>
  • Date: Fri, 22 Apr 2005 06:24:48 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

On 4/21/05 at 5:36 AM, konstantpi at wrote:

>Hi How to sort two lists such as: age={30,12,60,20};

>to give the output: age={12,20,30,60}

>ie: to keep every person opposite his age number. thanks

use Sort and Ordering as follows:

age = {30, 12, 60, 20}; 
pple = {"john", "kate", "peter", "alice"}; 


Out[3]={12, 20, 30, 60}
Out[4]={"kate", "alice", "john", "peter"}
To reply via email subtract one hundred and four

  • Prev by Date: Re: Sort problem
  • Next by Date: Re: Sort problem
  • Previous by thread: Re: Sort problem
  • Next by thread: Re: Sort problem