|
Contents | Previous | Next | Subchapters |
| Syntax |
tril(A)A, k)
|
| See Also | triu , diag , identity |
tril(A) returns the lower triangular part of A
The syntax tril(X,k)
returns the elements on and below the k-th diagonal
of A where
k is an integer, real or double-precision scalar.
The value
k = 0 corresponds to the main diagonal,
k > 0 corresponds to above the main diagonal,
and k < 0 corresponds to below the main diagonal.
A = {[1, 2], [3, 4]}
tril(A)
O-Matrix will respond
{
[ 1 , 0 ]
[ 3 , 4 ]
}
If you enter
A = {[1, 2 , 3], [4, 5, 6], [7, 8, 9]}
k = 1
tril(A, k)
O-Matrix will respond
{
[ 1 , 2 , 0 ]
[ 4 , 5 , 6 ]
[ 7 , 8 , 9 ]
}