MathGroup Archive 2003

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

Search the Archive

RE: simple vactor magitude question


Hi!

If your 1D list is: pList={x1,x2,x3,x4,...,xn}

Then you can find the sum by Apply[Plus,pList]

John C. Erb
Email:  John_C_Erb at prodigy.net

-----Original Message-----
From: Nathan Moore [mailto:nmoore at physics.umn.edu] 
To: mathgroup at smc.vnet.net
Subject: [mg43776] [mg43754] simple vactor magitude question

Suppose I generate a 1-d vecctor of "N" numbers, p[i], and now I want to
find the sum of (the vector element * index).  I think the syntax should
look
something like,

Sum[p[i]*i,{i,0,N}]

but this doesn't seem to be the correct syntax - any help would be
appreciated.

Nathan Moore,
University of Minnesota Physics



  • Prev by Date: Re: simple vactor magitude question
  • Next by Date: Re: simple vactor magitude question
  • Previous by thread: Re: simple vactor magitude question
  • Next by thread: Re: simple vactor magitude question