MathGroup Archive 2004

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

Search the Archive

Re: Selecting by first element of each list

  • To: mathgroup at smc.vnet.net
  • Subject: [mg48143] Re: Selecting by first element of each list
  • From: "Francesco Siano" <fsiano at thphy.uni-duesseldorf.de>
  • Date: Fri, 14 May 2004 20:58:58 -0400 (EDT)
  • Organization: Heinrich Heine Universitaet
  • References: <c81i3m$509$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Hi, try something like this :

put your identifiers in a list (I call it account) and define a mySelect  
function :

account = {... 2, 3, ...}
mySelect[ll_, x_] := Select[ll, #[[1]] == x &]

if

list={{2,3,4,5,77},{2,4,5,66,77},{3,4,7,8,90,6},{3,5,6,7,8,0},{3,45,67,77,12}}

then

mySelect[list, #] & /@ account

should do the job.
-Francesco


  • Prev by Date: System of DE's
  • Next by Date: Simple, syntactical question
  • Previous by thread: Re: Selecting by first element of each list
  • Next by thread: Re: Selecting by first element of each list