The cumSum() Command

Command Summary

Calculates cumulative sums of a list or of the columns of a matrix.

Command Syntax

cumSum(list or matrix)

Press:

1. 2nd [MATH] to access the math menu.
2. 3 to access the list submenu, or use arrows.
3. 7 to select cumSum(), or use arrows.

Alternatively, type cumSum( with the keyboard.

TI-89/92/+/v200

7 bytes

cumSum( calculates the cumulative sums of a list, or of the columns of a matrix, and outputs them in a new list or matrix variable.

For a list, this means that the Nth element of the result is the sum of the first N elements of the list, and the N-1th element of the result is the sum of the first N-1 elements, and so on:

``````cumSum({1,3,5,7,9})
{1 4 9 16 25}``````

For a matrix, cumSum( is applied to each column in the same way as it would be for a list (but numbers in different columns are never added):

``````cumSum([[0,1,1][0,1,3][0,1,5][0,1,7]])
[[0 1 1]
[0 2 4]
[0 3 9]
[0 4 16]]``````

``````(cumSum([[0,1,1][0,1,3][0,1,5][0,1,7]]ᵀ))ᵀ