Note: This page has been translated by MathWorks. Please click here

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Cumulative product

returns
the cumulative product of `B`

= cumprod(`A`

)`A`

starting at the beginning
of the first array dimension in `A`

whose size does
not equal 1.

If

`A`

is a vector, then`cumprod(A)`

returns a vector containing the cumulative product of the elements of`A`

.If

`A`

is a matrix, then`cumprod(A)`

returns a matrix containing the cumulative products for each column of`A`

.If

`A`

is a multidimensional array, then`cumprod(A)`

acts along the first nonsingleton dimension.

Was this topic helpful?