%% Median of Matrix Rows
% Define a 2-by-3 matrix.

A = [0 1 1; 2 3 2]

%
% Find the median value of each row.

M = median(A,2)

% For each row, the median value is the middle number in sorted order.
% Copyright 2012 The MathWorks, Inc.