%% Median of Matrix Columns
% Define a 4-by-3 matrix.

A = [0 1 1; 2 3 2; 1 3 2; 4 2 2]

%
% Find the median value of each column.

M = median(A)

% For each column, the median value is the mean of the middle two numbers in sorted order.
% Copyright 2012 The MathWorks, Inc.