Mathematica 9 is now available
THIS IS DOCUMENTATION FOR AN OBSOLETE PRODUCT.
SEE THE DOCUMENTATION CENTER FOR THE LATEST INFORMATION.
Mathematica > Core Language > List Manipulation > Math & Counting Operations on Lists >
Mathematica > Data Manipulation > Handling Arrays of Data > Math & Counting Operations on Lists >

Accumulate

Updated In 7 Graphic
Accumulate[list]
gives a list of the successive accumulated totals of elements in list.
  • If list has length n, then Accumulate[list] will have the same length.
  • Accumulate[list, Method->"CompensatedSummation"] uses compensated summation to reduce numerical error in the result.
Cumulative sums:
Accumulate within columns:
The head does not need to be List:
Triangular numbers:
Random walk:
Idealized random mountainside:
Cumulative sums of terms in a series:
Differences is almost the inverse of Accumulate:
Accumulate is equivalent to a particular case of FoldList:
Use Sum to symbolically accumulate sequences:
Diagonals of Pascal's triangle:
New in 6 | Last modified in 7
Ask a question about this page  |  Suggest an improvement  |  Leave a message for the team