RE: simple vactor magitude question
- To: mathgroup at smc.vnet.net
- Subject: [mg43776] RE: [mg43754] simple vactor magitude question
- From: "John C. Erb, Ph.D." <John_C_Erb at prodigy.net>
- Date: Sat, 4 Oct 2003 02:04:54 -0400 (EDT)
- Sender: owner-wri-mathgroup at wolfram.com
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