MathGroup Archive 2006

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

Search the Archive

Re: List Operations

  • To: mathgroup at smc.vnet.net
  • Subject: [mg65697] Re: List Operations
  • From: "Valeri Astanoff" <astanoff at yahoo.fr>
  • Date: Sun, 16 Apr 2006 01:44:53 -0400 (EDT)
  • References: <e1nn6s$lmm$1@smc.vnet.net>
  • Sender: owner-wri-mathgroup at wolfram.com

Example :

In[1]:=mylist={{1,a,b},{1,a,b},{1,a,b},
 {2,b,z},{2,b,z},{2,b,z},{2,b,z},
 {3,x,y},{3,x,y}};

In[2]:={#[[1,1]], (#[[All,2]].#[[All,3]])}& /@
 Split[mylist, #1[[1]] == #2[[1]]&]

Out[2]={{1,3 a b},{2,4 b z},{3,2 x y}}


hth

V.astanoff


  • Prev by Date: Plot {x,y} and {x,z} of a List {x,y,z}
  • Next by Date: Re: Typing special symbols in text mode?
  • Previous by thread: Re: List Operations
  • Next by thread: Re: List Operations