%% Test Nonsquare Matrix
% Create a 3-by-5 matrix.

A = [1 0 0 0 0; 2 1 0 0 0; 3 2 1 0 0]

%
% Test if A has nonzero elements above the main diagonal.

isbanded(A,2,0)

% The result is logical 1 (true) because the elements above the main diagonal are all zero.
% Copyright 2012 The MathWorks, Inc.