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

    %% Largest Element of Each Matrix Column  

%% 
% Create a fixed-point matrix. 
a = fi(magic(4),1,16)  

%% 
% Find the largest element of each column. 
x = max(a) 

%%
% The output, |x|, is a row vector that contains the largest elements from
% each column of |a|.  

%% 
% Find the index of each of the maximum elements. 
[x,y] = max(a) 

%%
% Vector |y| contains the indices to the minimum elements in |x|.