www.gusucode.com > dsp 案例源码程序 matlab代码 > dsp/CumulativeSumOfAMatrixExample.m
%% Cumulative Sum 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.CumulativeSum| object to compute the cumulative sum of a % matrix. hcsum = dsp.CumulativeSum; x = magic(2) y = hcsum(x) %% % The cumulative sum is computed column-wise along each channel.