www.gusucode.com > dsp 案例源码程序 matlab代码 > dsp/CumulativeProductOfAMatrixExample.m

    %% Cumulative Product of a Matrix
%%
% *Note*: This example runs only in R2016b or later. If you are using an
% earlier release, replace each call to the function with the equivalent
% |step| syntax. For example, myObject(x) becomes step(myObject,x).

%%
% Use the |dsp.CumulativeProduct| object to compute the cumulative product 
% of a matrix.
 hcprod = dsp.CumulativeProduct;
 x = magic(2)
 y = hcprod(x)
 
 %%
 % The cumulative product is computed column-wise along each channel.