Accumulate

Accumulate[list]

gives a list of the successive accumulated totals of elements in list.

Details and Options

Examples

open allclose all

Basic Examples  (2)

Cumulative sums:

Accumulate within columns:

Scope  (3)

Accumulate a regularly sampled TimeSeries:

The created time stamps are regularly spaced:

Accumulate:

Path:

Compare to the accumulated values:

Accumulate an irregularly sampled time series:

Accumulate values:

Or define a new time series and set TemporalRegularity to True:

The path has not changed:

Now the result of Accumulate is given as a TimeSeries:

Accumulate data involving quantities:

Generalizations & Extensions  (1)

The head does not need to be List:

Applications  (4)

Triangular numbers:

Random walk:

Idealized random mountainside:

Cumulative sums of terms in a series:

Properties & Relations  (3)

Differences is almost the inverse of Accumulate:

Accumulate is equivalent to a particular case of FoldList:

Use Sum to symbolically accumulate sequences:

Possible Issues  (1)

Accumulating directly an irregularly sampled time series may differ from accumulating the values:

Path:

Check if regularly sampled:

Accumulate the time series:

This is not the same as the accumulated values:

The time series was first upsampled according to MinimumTimeIncrement and then downsampled:

Assume temporal regularity to simply accumulate the values:

Neat Examples  (1)

Diagonals of Pascal's triangle:

Introduced in 2007
 (6.0)
 |
Updated in 2008
 (7.0)