%% Cumulative Product of Matrix
% Note: If you are using R2016a or an earlier release, replace each call to the object with the equivalent step syntax. For example, obj(x) becomes step(obj,x).
% Use the dsp.CumulativeProduct object to compute the cumulative product of a matrix.

 cprod = dsp.CumulativeProduct;
 x = magic(2)
 y = cprod(x)

% The cumulative product is computed column-wise along each channel.