cumprodc#

Purpose#

Computes the cumulative products of the columns of a matrix.

Format#

y = cumprodc(x)#
Parameters:

x (NxK matrix)

Returns:

y (NxK matrix) – containing the cumulative products of the columns of x.

Examples#

x = { 1 -3,
      2  2,
      3 -1 };

y = cumprodc(x);

Now if you view y, you will see:

    1.000 -3.000
y = 2.000 -6.000
    6.000  6.000

Remarks#

This is based on the recursive series recsercp(). recsercp() could be called directly as follows:

recsercp(x, zeros(1, cols(x)));

to accomplish the same thing.

Source#

cumprodc.src

See also

Functions cumsumc(), recsercp(), recserar()