cumsum
Symbolic cumulative sum
Description
returns the cumulative sum of B = cumsum(A)A starting at the beginning of
the first array dimension in A whose size does not equal 1. The
output B has the same size as A.
If
Ais a vector, thencumsum(A)returns a vector containing the cumulative sum of the elements ofA.If
Ais a matrix, thencumsum(A)returns a matrix containing the cumulative sums of each column ofA.If
Ais a multidimensional array, thencumsum(A)acts along the first nonsingleton dimension.
