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

    %% Test Matrix Columns  

%% 
% Create a 3-by-3 matrix, and then test each column for all nonzero
% elements.
A = [0 0 3;0 0 3;0 0 3]  

%% 
B = all(A)