Navigation

Operators and Keywords

Function List:

C++ API

: cumsum (x)
: cumsum (x, dim)
: cumsum (…, "native")
: cumsum (…, "double")
: cumsum (…, "extra")

Cumulative sum of elements along dimension dim.

If dim is omitted, it defaults to the first non-singleton dimension. For example:

cumsum ([1, 2; 3, 4; 5, 6])
  ⇒  1   2
      4   6
      9  12

See sum for an explanation of the optional parameters "native", "double", and "extra".

See also: sum, cumprod.

Package: octave