Command Reference : Matrix Language Reference
  
 
@cumsum
Syntax: @cumsum(M)
Argument: matrix, M
Return: matrix
Returns a matrix holding the cumulative sum of the elements of matrix M in vectorization order. Example:
@cumsum(@ones(3,3)*2)
See also @colcumsum, @cumprod, and @colcumprod.