%% Extract Lower Triangular Portions of Matrix
% Create a 4-by-4 matrix of ones. Extract the lower triangular portion.

A = ones(4)

%

B = tril(A)

%
% Extract only the elements below the main diagonal.

C = tril(A,-1)

% Copyright 2012 The MathWorks, Inc.