within a matlab code of mine, I have to deal with the Cholesky factorization of a certain given matrix. I am generally calling chol(A,'lower')
to generate the lower triangular factor.
Now, checking my code with the profiler
, it is evident that function chol
is really time consuming, especially if the size of the input matrix becomes large.
Therefore, I would like to know, if there is any valuable alternative to the built-in chol
function.
I have been thinking of the LAPACK
library, and namely of spptrf
function. Is it available in MATLAB
or not?
Any hint or support are more than welcome.
EDIT
Just as an example, the profiler retrieves this information:
where Coh_u
has size (1395*1395)
. It has, also, to be remarked that chol
is called 4000
times, since I need the cholesky factor for 4000
different configurations.
I'm not sure what version of matlab you are using, but I found this discussion, which suggests in older versions that Cholesky Factorization was very slow as you're describing.
One of the answers there says to use the CHOLMOD package or SuiteSparse, which has a chol2
function that is supposed to be faster.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With