L = tril(X)L = tril(X,k)
tril(X) is the lower triangular part of X.
tril(X,k) is the elements on and below the k-th diagonal of X. k = 0 is the main diagonal, k > 0 is above the main diagonal, and k < 0 is below the main diagonal.
tril(ones(4,4),-1) is
0 0 0 01 0 0 01 1 0 01 1 1 0
diag,triu
(c) Copyright 1994 by The MathWorks, Inc.