Re: Sort problem

• To: mathgroup at smc.vnet.net
• Subject: [mg56352] Re: [mg56292] Sort problem
• From: "Tomas Garza" <tgarza10 at msn.com>
• Date: Fri, 22 Apr 2005 06:23:49 -0400 (EDT)
• References: <200504210936.FAA05023@smc.vnet.net>
• Sender: owner-wri-mathgroup at wolfram.com

```Is this what you want?

In[3]:=
{age,pple}=Transpose[Sort[Transpose[{age,pple}]]]
Out[3]=
{{12,20,30,60},{kate,alice,john,peter}}

In[4]:=
age
Out[4]=
{12,20,30,60}

In[5]:=
pple
Out[5]=
{kate,alice,john,peter}

Tomas Garza
Mexico City
----- Original Message -----
From: <konstantpi at mail15.com>
To: mathgroup at smc.vnet.net
Subject: [mg56352] [mg56292] Sort problem

> Hi
> How to sort two lists such as:
> age={30,12,60,20};
> pple={"john","kate","peter","alice"};
>
> to give the output:
> age={12,20,30,60}
> pple={"kate","alice","john","peter"}
>
> ie: to keep every person opposite his age number.
> thanks
>
>

```

• Prev by Date: Re: removing sublist . Again and Different
• Next by Date: Re: Re: multiple 3d plots
• Previous by thread: Re: Sort problem
• Next by thread: Re: Sort problem