www.gusucode.com > matlab 案例源码 matlab代码程序 > matlab/ReverseCumulativeProductExample.m
%% Reverse Cumulative Product %% % Create a 3-by-3 matrix of random integers between 1 and 10. rng default; A = randi([1,10],3) %% % Calculate the cumulative product along the columns. Specify the |'reverse'| % option to work from bottom to top in each column. The result is the same size as |A|. B = cumprod(A,'reverse')