Re: computing cumulative sum for list
- To: mathgroup at smc.vnet.net
- Subject: [mg54466] Re: computing cumulative sum for list
- From: "Drago Ganic" <drago.ganic at in2.hr>
- Date: Mon, 21 Feb 2005 03:44:36 -0500 (EST)
- References: <cv6s22$6kf$1@smc.vnet.net>
- Sender: owner-wri-mathgroup at wolfram.com
Hi Uwe,
Just use:
Needs["Statistics`DataManipulation`"]
In[4]:=CumulativeSums[{1, 2, 3, 4, 5}]
Out[4]={1, 3, 6, 10, 15}
Greetings,
Drago
"Uwe Ziegenhagen" <newsgroup at ziegenhagen.info> wrote in message
news:cv6s22$6kf$1 at smc.vnet.net...
> Hello,
>
> I would like to compute the cumulative sum for a list, but do not find
> the command.
>
> For
>
> {1,2,3,4,5}
>
> I would like to get
>
> {1,3,4,10,15}
>
>
> Is there nothing builtin in Mathematica? I already looked in lists and
> matrices and Google...
>
> Uwe
>
> --
>
> mail to newsgroup at ziegenhagen.info is read only from time to time. If
> you need an urgent answer, google for me.
>