MathGroup Archive 2003

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

Search the Archive

Re: sum with lists

  • To: mathgroup at smc.vnet.net
  • Subject: [mg40591] Re: sum with lists
  • From: Bill Rowe <listuser at earthlink.net>
  • Date: Thu, 10 Apr 2003 03:43:56 -0400 (EDT)
  • Sender: owner-wri-mathgroup at wolfram.com

On 4/9/03 at 8:26 PM, nmoore at physics.umn.edu (Nathan Moore) wrote:

>Another list question.  Suppose that I have the list d={ {x0,y0,z0},
>{x1,y1,z1}, 
>{x2,y2,z1}, 
>... 
>{xn,yn,zn}}
>
>and now I'd like to calculate the sum, Sum[x[i]*z[i],{i,0,n/2}]

A simple way to do this would be

Tr[Take[d, Floor[n/2].{1,0,1}]


  • Prev by Date: music with Mathematica
  • Next by Date: Assign values to characters gen by "FromCharacterCode"
  • Previous by thread: Re: sum with lists
  • Next by thread: Re: Re: sum with lists