# Accumulate

Accumulate[list]

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

# 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:

Wolfram Research (2007), Accumulate, Wolfram Language function, https://reference.wolfram.com/language/ref/Accumulate.html (updated 2008).

#### Text

Wolfram Research (2007), Accumulate, Wolfram Language function, https://reference.wolfram.com/language/ref/Accumulate.html (updated 2008).

#### CMS

Wolfram Language. 2007. "Accumulate." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2008. https://reference.wolfram.com/language/ref/Accumulate.html.

#### APA

Wolfram Language. (2007). Accumulate. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Accumulate.html

#### BibTeX

@misc{reference.wolfram_2024_accumulate, author="Wolfram Research", title="{Accumulate}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Accumulate.html}", note=[Accessed: 30-May-2024 ]}

#### BibLaTeX

@online{reference.wolfram_2024_accumulate, organization={Wolfram Research}, title={Accumulate}, year={2008}, url={https://reference.wolfram.com/language/ref/Accumulate.html}, note=[Accessed: 30-May-2024 ]}