cumsum:

Syntax:	cumsum ( A )

Description:

	cumsum computes the running, or cumulative sum of a vector or
	matrix. The return object is a matrix the same size as the
	input, A. If A is a rectangular matrix, then the cumulative
	sums are performed over the columns of the matrix.

Example:

		> a = 1:4
		 a =
		        1          2          3          4  
		> cumsum(a)
		        1          3          6         10  
		> a= [1,2,3;4,5,6;7,8,9]
		 a =
		        1          2          3  
		        4          5          6  
		        7          8          9  
		> cumsum (a)
		        1          2          3  
		        5          7          9  
		       12         15         18  

See Also: cumprod, prod, sum
