MathGroup Archive 2004

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

Search the Archive

Re: sort procedure

  • To: mathgroup at smc.vnet.net
  • Subject: [mg52501] Re: [mg52483] sort procedure
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Tue, 30 Nov 2004 05:24:03 -0500 (EST)
  • Reply-to: hanlonr at cox.net
  • Sender: owner-wri-mathgroup at wolfram.com

Test data sorted by first values:

data=Sort[Table[
      {Random[Integer,{0,100}],
        Random[Integer,{0,100}]},{5}]]

{{18, 1}, {25, 29}, {51, 99}, {67, 90}, {81, 45}}

Sorted by second value:

Sort[data, #1[[2]]<#2[[2]]&]

{{18, 1}, {25, 29}, {81, 45}, {67, 90}, {51, 99}}


Bob Hanlon

> 
> From: "paolo " <tarpanelli at libero.it>
To: mathgroup at smc.vnet.net
> Date: 2004/11/29 Mon AM 01:22:30 EST
> To: mathgroup at smc.vnet.net
> Subject: [mg52501] [mg52483] sort procedure
> 
> If I have a data serie of n paired observations (x_t,x_t-1) ordered according 
to time, how can i re-order this serie according to the size of x_t-1
> 
> The procedure Sort it seems it does not work well.
> anyone has suggestions?
> thanks
> 
> P.
> 
> 
> 
> ____________________________________________________________
> Libero ADSL: navighi gratis a 1.2 Mega, senza canone e costi di attivazione. 
> Abbonati subito su http://www.libero.it 
> 
> 
> 


  • Prev by Date: help on sublists xor
  • Next by Date: Re: sort procedure
  • Previous by thread: Re: sort procedure
  • Next by thread: Re: sort procedure