Command Reference : Function Reference : Function Reference: C
  
 
@colcumsum
Cumulative sums for each column of a matrix.
Syntax: @colcumsum(m)
m: matrix, vector
Return: matrix, vector
Returns a matrix where each column contains the cumulative sums of the values of the corresponding column of m.
For each element of the output, compute the cumulative sum of the values in m from the start of the column up to the current row:
Examples
Let M1 be an matrix of IID uniform numbers drawn from the unit interval. Then
= @colcumsum(m1)
generates an matrix whose columns diverge to infinity at a linear rate.
Cross-references
See also @colcumprod.
See also @cumprod and @cumsum.
See also @cprod, @csum, and @csumsq.