how can i force a matrix to be positive sime-definite matrix?

16 ビュー (過去 30 日間)
arkedia
arkedia 2013 年 2 月 12 日
i'm creating a gibbs sampling algorithm and i one of thge steps an error appears in using mvnrnd function , sigma must be positive semi definite matrix what can i do?

回答 (2 件)

Jan
Jan 2013 年 2 月 12 日
編集済み: Jan 2013 年 2 月 12 日
Perhaps it helps to know, that A*A is positive semi-definite for any matrix A. But it is not clear how your data should be changed to match the requirements. Please post more details.

Youssef  Khmou
Youssef Khmou 2013 年 2 月 12 日
hi, arkedia,
like Jan said you can take mvnrnd(A*A) if A is square or A*conj(A') otherwise and A*A~SIGMA , but if A is an array of data then A*A will create covariance of SIGMA matrix itself which will mess your calculations,
Try to alter your code using abs(SIGMA) instead of sigma .

カテゴリ

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by