mvnpdf says my covariance matrix is not symmetric and positive-definite. BUT IT IS!
    조회 수: 4 (최근 30일)
  
       이전 댓글 표시
    
The matrix I'm working with is
G=[1.193220936874846 1.752209119064988 0; 1.752209119064988 2.573066480861231 0; 0 0 2.666666666666666];
and the way that I test whether a matrix is positive-definite is
[R, err] = cholcov(G, 0).
If err is 0 then it is positive-definite, but if it's > 0 then the matrix is not positive-definite.
So, given that, Matlab says that G is positive-definite but that .5*G is not! According to the link below (#2 under further properties), any scalar multiple of a positive-definite matrix is also positive-definite.
So what gives? Anybody know a way to work around this and use my matrix .5*G as the sigma argument in mvnpdf?
댓글 수: 0
답변 (1개)
  Walter Roberson
      
      
 2011년 6월 26일
        That same page says that in order for a matrix to be positive definite, all of the eigenvalues must be positive.
>> eig(G)
ans =
                         0
          2.66666666666667
          3.76628741773608
0 is not positive, so G is not positive definite by that definition.
To understand what is going on...
>> cond(G)
ans =
      1.50674422424918e+16
That is above 1/eps so you are losing enough precision in doing the calculations as to render them suspect; different calculation routines might or might not explode for them.
댓글 수: 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!