Negative eigenvalues

Dear all,
I try to simulate the data using mvnrdn function but I had the the error saying that "SIGMA must be a symmetric positive semi-definite matrix". I checked the eigenvalues and the problem seems to be the negative eigenvalues of covariance matrix. Does anyone know how to fix this problem?
mean=[3.6,0.48,1.8,1.8,1.12]
var=[0.5365 0.0676 0.2527 0.2527 0.1581
0.0676 0.0092 0.0340 0.0340 0.0213
0.2527 0.0340 0.1321 0.1272 0.0796
0.2527 0.0340 0.1272 0.1321 0.0796
0.1581 0.0213 0.0796 0.0796 0.0511];
Thank you for your suggestions,
Wan

1 Comment

Hi Winn, I would not name your matrix, var, that is the name of a MATLAB function (variance) and that is going to cause you problems.
Is the matrix you have listed above your covariance matrix, or your variable matrix?

Sign in to comment.

Answers (0)

Categories

Find more on Linear Algebra in Help Center and File Exchange

Asked:

on 23 Feb 2012

Edited:

on 22 Oct 2013

Community Treasure Hunt

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

Start Hunting!