compute determinant using Cholesky decomposition

조회 수: 11 (최근 30일)
Gaurav Gupta
Gaurav Gupta 2012년 6월 13일
댓글: youtha 2019년 1월 5일
I need to compute determinant of a positive definite, hermitian matrix in fastest way for my code. So the best way is to compute by cholesky decomposition, but on writing code for it there is no improvement over MATLAB built-in function "det" which is based on LU decomposition (more complex than cholskey). Can anyone help, can we modify matlab buit-in function "chol" to determine determinant from it directly.
  댓글 수: 2
Gaurav Gupta
Gaurav Gupta 2012년 6월 14일
Can MATLAB people help me with this
youtha
youtha 2019년 1월 5일
Try using
:)
L=chol(A)
p=1;
for i=1:n
p=p*L(i,i)^2
end

댓글을 달려면 로그인하십시오.

답변 (2개)

Walter Roberson
Walter Roberson 2012년 6월 13일
Keep in mind that for sufficiently large matrices, MATLAB is going to invoke multi-threaded library code that has been heavily optimized for the target architectures. (It doesn't do that for smaller matrices because there is notable overhead in re-arranging the arrays into the form required by those libraries.)

Teja Muppirala
Teja Muppirala 2012년 6월 14일
You could try
prod(diag(chol(A)))^2
But I have no idea if/when this would be faster than simply det(A).
  댓글 수: 1
Gaurav Gupta
Gaurav Gupta 2012년 6월 14일
I have tried this before posting question, but there is no improvement over time.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by