eig() shows positive eigenvalues while chol() failed

4 ビュー (過去 30 日間)
Allen Lau
Allen Lau 2015 年 5 月 24 日
コメント済み: John D'Errico 2016 年 6 月 18 日
Hi guys,
I was LU-decomposing a supposed-to-be positive-definite matrix using "chol" in a loop. However, occasionally it failed with the warning
" Error using chol
Matrix must be positive definite. "
eig() shows that the smallest eigenvalue is 1.8*10^(-4) which I think should be well above zero. BTW, the largest one is 7.7*10^9.
How can I get around this dilemma? Your suggestions are greatly appreciated. Many thanks.
  6 件のコメント
Ricardo Almeida
Ricardo Almeida 2016 年 6 月 18 日
I´m having the same problem. Without going into peculiarities of decomposition methods, I think it might be some technical issue. I'm running chol function in two different computers, both Windows 7 64bits and matlab 2015a. One flags a positive definite matrix and other don't (Maybe it's a coincidence but always return the number of columns).
John D'Errico
John D'Errico 2016 年 6 月 18 日
Read my comment to the other question where you made the same comment.

サインインしてコメントする。

採用された回答

John D'Errico
John D'Errico 2015 年 5 月 24 日
編集済み: John D'Errico 2015 年 5 月 24 日
I wrote nearestSPD (download it from the file exchange) for this purpose. It will tweak the values of your matrix slightly so that chol should always succeed. Of course, if the required tweak is necessarily large, it will still make a minimal change so that the result is as close as possible, yet will be positive definite.

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeLinear Algebra についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by