%% 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)

% Copyright 2012 The MathWorks, Inc.