istril

Tests whether a matrix is lower triangular.

Category: Mathematics > Linear Algebra

Syntax

tf = istril(A)

True if all entries above the main diagonal are zero.

Description

The diagonal and everything below it are unrestricted. Diagonal matrices are both lower and upper triangular. Lower triangular matrices are solved by forward substitution, which is why solvers check this property.

Input arguments

A
Numeric or logical matrix.

Output arguments

tf
Logical scalar.

Example

Lower and not lower

istril([1 0; 2 3])
istril([1 2; 0 3])
Output
ans = logical
   1
ans = logical
   0

See also

istriu isdiag tril isbanded