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

    %% Cumulative Maximum Values in Matrix Columns  

%% 
% Find the cumulative maxima of the columns of a 3-by-3 matrix. 
A = [3 5 2; 1 6 3; 7 8 1]  

%%  
M = cummax(A)