MathGroup Archive 2006

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

Search the Archive

Re: List Operations


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