Hi Matthias,
I understand that you are trying to use the 'chol' function to find the upper/lower triangular Cholesky factor of a certain 3x3 matrix. You are getting an error that the matrix 'must be positive definite', even though it looks like the matrix is already positive definite.
Unfortunately, it seems that the matrix X is not actually positive definite. To explain, the 'svd' function returns the singular values of the input matrix, not the eigenvalues. These two are not the same, and in particular, the singular values will always be nonnegative; therefore, they will not help in determining whether the eigenvalues are nonnegative. To obtain the eigenvalues, you can use the 'eig' function, as follows:
>> eig(X)
ans =
-0.1885
1.3032
4.8853
Note that when you use the 'eig' function to obtain the eigenvalues, one of the values is -0.1885; therefore, the eigenvalues are not strictly positive, and the matrix is not positive definite.
For more information, see the documentation on singular values and eigenvalues:
Best Answer