Why would chol fail?

조회 수: 3 (최근 30일)
David Winthrop
David Winthrop 2013년 4월 23일
댓글: Mohamed Selim 2013년 10월 10일
I have a positive definite sparse array. When I do the chol like
L = chol(M,'lower')
M2 = (L)*(L.')
I find that M2 is not equal to M. I mean that all the elements are equal except 4. These elements are zero in M and -.7 on M2, and vis versa. In other words, M2 has two element pairs that have switched values. I thought M2 should equal M.
I need to solve
Ax = b
Ax = c
Ax = d
...
etc.
How can I use chol to do this efficiently? I have to use stock MATLAB functions.
  댓글 수: 1
Mohamed Selim
Mohamed Selim 2013년 10월 10일
chol function works only with Positive Definate and Symmetric square matrices.
Make sure that your matrix M is symmetric.
You can use "isequal(M , M')"
if you get "1" => M is Symmetric
If you get "0" => M is not Symmetric.

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

답변 (0개)

카테고리

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