how can i force a matrix to be positive sime-definite matrix?
조회 수: 4 (최근 30일)
이전 댓글 표시
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?
댓글 수: 0
답변 (2개)
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 .
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!