%% Test Matrix Rows
% Create a 3-by-3 matrix.

A = [0 0 3;0 0 3;0 0 3]

%
% Test the rows of A for all nonzero elements by specifying dim = 2.

B = all(A,2)

% Copyright 2012 The MathWorks, Inc.