开发者

How can I use mvnrnd function in simulation?

开发者 https://www.devze.com 2023-02-12 22:39 出处:网络
when using mvnrnd function we use mean and covariance matrix which is positive semi definite my question is:

when using mvnrnd function we use mean and covariance matrix which is positive semi definite my question is:

When us开发者_StackOverflow社区ing this function in simulation the covariance matrix sometimes is not positive semi definite how can I deal with it? Using chol function? If so how?


Very similar discussion here

The short answer is that your input (which is output from your simulation) is not valid. This could be for a few reasons.

Without knowing your situation, I would point you to this resource to figure out why you are getting covariances that are not positive semi-definite, and the last section of that site gives a method of "side-stepping" the problem.

0

精彩评论

暂无评论...
验证码 换一张
取 消