Member of the basic class.
c = cumsum(a)
c = cumsum(a, b)
Computes the cumulative sums of vectors and matrices.
| Name | Description | ||||
| a | Specifies a vector or matrix. | ||||
| b | Specifies whether to compute the column-wise or row-wise cumulative sums when a is a matrix. b is an integer that accepts the following values.
|
| Name | Description |
| c | Returns the cumulative sums of a. c is a vector or matrix of the same size as a. If a is a vector, c returns a vector of the cumulative sums of a. If a is a matrix and you do not specify b, c returns a matrix whose elements are the column-wise cumulative sums of a. |
A = [1:1:15]
C = cumsum(A)