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

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