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

    %% Cumulative Minimum Array Values in Reverse Direction  

%% 
% Calculate the cumulative minima in the third dimension of a 2-by-2-by-3
% array. Specify |direction| as |'reverse'| to work from the end of the
% third dimension to the beginning. 
A = cat(3,[1 2; 3 4],[9 10; 11 12],[5 6; 7 8])  

%%  
M = cummin(A,3,'reverse')