Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2006
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*November
*December
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

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