Group: | Matrix Manipulation |
Topic: | Sorting and Counting |
See also: | cumsum prod sum |
Function: | cumprod | |
Description: | cumprod computes the cumulative product of the elements in an array regarding a given dimension. |
Usage: | z = cumprod (x, j) | |
Input: | ||
x | array | |
j | integer (number of dimension, default = 1) | |
Output: | ||
z | array |
x = #(1, 2, 3)~#(2, 3, 4)~#(3, 4, 5) cumprod(x)
Contents of cumprod [1,] 1 2 3 [2,] 2 6 12 [3,] 6 24 60