How to convert Cholesky {Float64,Array{Float64,2}} to Array{Float64,2} in julia

Hello,
I am using Julia 1.0.4 to do a cholesky decomposition I wrote the following code:
using LinearAlgebra
A=[1 0 1; 0 2 0; 1 0 3];
BB=cholesky(A);

and the result is:

BB=Cholesky{Float64,Array{Float64,2}}([1.0 0.0 1.0; 0.0 1.41421 0.0; 1.0 0.0 1.41421], ā€˜Uā€™, 0)

and I am not able to do further calculations on my BB matrix because of its format.
My question is how to convert the output of cholesky decomposition with Cholesky{Float64,Array{Float64,2}} format to Array{Float64,2}

Utimately, I need my BB=[1.0 0.0 1.0; 0.0 1.41421 0.0; 1.0 0.0 1.41421]

maybe: convert(Matrix, BB.UL)

1 Like

Matrix(BB) gives you what you want.

Also, for better readability you should use triple quotes ``` <code goes here> ``` to indicate blocks of code here on discourse.

1 Like

Thanks it worked

Thanks for your guidance, but <Matrix(BB)> gave me my original Matrix, matrix <A>, that I decomposed.