Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

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

Example:
x = #(1, 2, 3)~#(2, 3, 4)~#(3, 4, 5)
cumprod(x)

Result:
Contents of cumprod

[1,]     1     2     3
[2,]     2     6    12
[3,]     6    24    60



(C) MD*TECH Method and Data Technologies, 05.02.2006