|
SOLUTIONS
|
Mathematica
>
Mathematics and Algorithms
>
Matrices and Linear Algebra
>
Parts of Matrices
>
UpperTriangularize
BUILT-IN MATHEMATICA SYMBOL
UpperTriangularize
UpperTriangularize[m]
gives a matrix in which all but the upper triangular elements of m are replaced with zeros.
UpperTriangularize[m, k]
replaces with zeros only the elements below the k
subdiagonal of m.
DetailsDetails
- UpperTriangularize[m] works even if m is not a square matrix.
- In UpperTriangularize[m, k], positive k refers to subdiagonals above the main diagonal and negative k refers to subdiagonals below the main diagonal.
- UpperTriangularize works with SparseArray objects.
New in 7
Mathematica 9 is now available!
New to Mathematica?
Find your learning path »
Have a question?
Ask support »
