Symbolic Math Toolbox
 Go to function:
  Search    Help Desk 
tril ExamplesSee Also

Symbolic lower triangle.

Syntax

Description

tril(X) is the lower triangular part of X.

tril(X,K) returns a lower triangular matrix that retains the elements of X on and below the k-th diagonal and sets the remaining elements to 0. The values k=0, k>0, and k<0 correspond to the main, superdiagonals, and subdiagonals, respectively.

Examples

Suppose

Then tril(A) returns

tril(A,1) returns

triu(A,-1) returns

See Also

diag, triu



[ Previous | Help Desk | Next ]