Command Reference : Function Reference : Function Reference: C
  
 
@colcumprod
Cumulative products for each column of a matrix.
Syntax: @colcumprod(m)
m: matrix, vector
Return: matrix, vector
Returns a matrix where each column contains the cumulative products of the values of the corresponding column of m.
For each element of the output, compute the cumulative product of the values in m from the start of the column up to the current row:
Note that this function is prone to numeric overflow.
Examples
Let M1 be an matrix of IID uniform numbers drawn from the unit interval. Then
= @colcumprod(m1)
generates an matrix whose columns converge to 0 at an exponential rate.
Cross-references
See also @colcumsum.
See also @cumprod and @cumsum.
See also @cprod, @csum, and @csumsq.