MathGroup Archive 2006

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

Search the Archive

List Operations

  • To: mathgroup at
  • Subject: [mg65681] List Operations
  • From: "LectorZ" <lectorz at>
  • Date: Fri, 14 Apr 2006 04:32:05 -0400 (EDT)
  • Sender: owner-wri-mathgroup at

Hi guys,

My question:

mylist={{1,a, b},{1,a, b},{1,a,

The sublists are of different length.

I need to calculate the product between the 2nd and 3rd element of
every sublist (e.g. a*b) and then add them up according to the 1st
element: sum of all products where the 1st element is 1, 2, ...n.

The result should be a list like that:
{{1,a*b+a*b+a*b},{2,b*z+b*z+b*z+b*z}, ...,{n, x*y+x*y+x*y+...+x*y}}

Thank you for your help.


  • Prev by Date: LinearProgramming unbounded
  • Next by Date: 3D ContourGraphics alternative
  • Previous by thread: Re: LinearProgramming unbounded
  • Next by thread: Re: List Operations