Suppose I have a Matrix
, and I only want the upper triangular values stored in a Vector
:
julia> A = [1.0 2.0 3.0; 4.0 5.0 6.0; 7.0 8.0 9.0]
3×3 Matrix{Float64}:
1.0 2.0 3.0
4.0 5.0 6.0
7.0 8.0 9.0
julia> UpperTriangular(A)
3×3 UpperTriangular{Float64, Matrix{Float64}}:
1.0 2.0 3.0
⋅ 5.0 6.0
⋅ ⋅ 9.0
How do I get 1.0
to 9.0
from UpperTriangular(A)
?