.. highlightlang:: us .. index:: cumsum .. _cumsum: cumsum ====== .. us.tag cumsum ENGLISH math-base :ref:`cumsum` returns the cumulative sums of each column of a matrix. .. function:: rmCumsum = cumsum(rmMat) .. us.return **Return Value** *rmCumsum* is a real matrix with cumulative sums. .. us.params **Parameters** .. uparam:: r *r* is a real matrix. .. us.example **Example** :: a = [1,2,3; 4,5,6; 7,8,9] cumsum(a) 1 2 3 5 7 9 12 15 18 .. seealso:: :ref:`overview-mathematic`, :ref:`diff` :sub:`id-370529`