Re: simple vactor magitude question
- To: mathgroup at smc.vnet.net
- Subject: [mg43788] Re: simple vactor magitude question
- From: Bas Zoetekouw <news200310 at caradhras.net>
- Date: Sat, 4 Oct 2003 02:05:08 -0400 (EDT)
- References: <blj5e0$1dv$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Nathan Moore wrote in comp.soft-sys.math.mathematica:
> 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.
Sum[p[i]*i,{i,0,N-1}] perhaps?
--
Kind regards,
Bas Zoetekouw ``Si l'on sait exactement ce que l'on va
faire, a quoi bon le faire?''
bas at o2w.nl Pablo Picasso