Determine if matrix is upper triangular
tf = istriu(A)
tf = istriu(
returns logicalA
)1
(true
) ifA
is anupper triangular matrix; otherwise, it returns logical0
(false
).
Use thetriu
函数produce upper triangular matrices for whichistriu
returns logical1
(true
).
The functionsisdiag
,istriu
, andistril
are special cases of the functionisbanded
, which can perform all of the same tests with suitably defined upper and lower bandwidths. For example,istriu(A) == isbanded(A,0,size(A,2))
.