istril
istril(A) -> Bool
Test whether a matrix is lower triangular.
Examples
julia> A = [1 0 0; 2 3 0; 4 5 6]
3×3 Array{Int64,2}:
1 0 0
2 3 0
4 5 6
julia> istril(A)
true
This example demonstrates the usage of the istril
function to check if a matrix is lower triangular. The function returns true
if the matrix A
is lower triangular, and false
otherwise.
julia> B = [1 2 3; 0 4 5; 0 0 6]
3×3 Array{Int64,2}:
1 2 3
0 4 5
0 0 6
julia> istril(B)
false
In this example, the matrix B
is not lower triangular, so the function returns false
.
Common mistake example:
julia> C = [1 2 3; 0 4 0; 0 0 6]
3×3 Array{Int64,2}:
1 2 3
0 4 0
0 0 6
julia> istril(C)
true
In this example, the matrix C
is not lower triangular, but the function incorrectly returns true
. This mistake can occur if the matrix is not properly defined as lower triangular. Ensure that the matrix is in the correct form before using the istril
function.
See Also
Ac_ldiv_B, Ac_ldiv_Bc, Ac_mul_B, Ac_mul_Bc, Ac_rdiv_B, Ac_rdiv_Bc, At_ldiv_B, At_ldiv_Bt, At_mul_B, At_mul_Bt, At_rdiv_B, At_rdiv_Bt, A_ldiv_Bc, A_ldiv_Bt, A_mul_B!, A_mul_Bc, A_mul_Bt, A_rdiv_Bc, A_rdiv_Bt, Bidiagonal, cond, conv2, det, diag, diagind, diagm, diff, eig, eigvals, eigvecs, expm, eye, full, inv, isdiag, ishermitian, isposdef, isposdef!, issym, istril, istriu, logabsdet, logdet, lyap, norm, qrfact, rank, repmat, rot180, rotl90, rotr90, sortrows, sqrtm, SymTridiagonal, trace, Tridiagonal, tril, tril!, triu, triu!, writedlm,User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.