comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » how to calculate a running total of a vector
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
how to calculate a running total of a vector [message #3218] Fri, 02 December 1994 09:51 Go to previous message
VUKOVIC is currently offline  VUKOVIC
Messages: 6
Registered: December 1994
Junior Member
Suppose I have a vector v.
I want to generate a vector vv whose i-th element is a sum of the first i
elements of v. How to do it fast -- without loops?

I thought of multiplying a matrix with 1's on and bellow its diagonal by v.
That would do it, but seems like a bit of overkill.
[Message index]
 
Read Message
Read Message
Previous Topic: Princip Components, Factor Analysis software available?
Next Topic: Please explain this if you can: (short)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 15:28:54 PDT 2025

Total time taken to generate the page: 0.63914 seconds