Scilab Function

cumprod - cumulative product

Calling Sequence

y=cumprod(x)
y=cumprod(x,'r') or y=cumprod(x,1)
y=cumprod(x,'c') or y=cumprod(x,2)

Parameters

Description

For a vector or a matrix x, y=cumprod(x) returns in y the cumulative product of all the entries of x taken columnwise.

y=cumprod(x,'c') (or, equivalently, y=cumprod(x,2)) returns in y the cumulative elementwise product of the columns of x: y(i,:)=cumprod(x(i,:))

y=cumprod(x,'r') (or, equivalently, y=cumprod(x,2)) returns in y the cumulative elementwise product of the rows of x: y(:,i)=cumprod(x(:,i)).

Examples

See Also