Generate Gassian Colored Noise

조회 수: 6 (최근 30일)
S. David
S. David 2014년 5월 23일
편집: S. David 2014년 5월 24일
Hello all,
Is there any built-in function in MATLAB to generate a Gaussian noise with a specific covariance matrix R (colored noise), not necessarily the identity matrix (white noise)?
Thanks

채택된 답변

Matt J
Matt J 2014년 5월 23일
편집: Matt J 2014년 5월 23일
There's MVRND, if you have the Stats Toolbox.
Otherwise, you can just do
sqrtm(R)*randn(size(R,2),1);
  댓글 수: 5
Matt J
Matt J 2014년 5월 24일
편집: Matt J 2014년 5월 24일
If R is close to singular, it can be mis-perceived as having some negative eigenvalues (and hence as not being psd) due to numerical imprecision.
However, if your R is close to singular, it really means you're taking the covariance of have some redundant variables - some of them are approximately linear combinations of the others - and should get rid of them.
S. David
S. David 2014년 5월 24일
편집: S. David 2014년 5월 24일
I have two matrices, and I found the eigenvalue of both of them: one of them has all positive eigenvalues, but the other has some negative eigenvalues. I guess the second one is close to singular as you said. But even when I try the first one in mvrand(Mu,Sigma), I still get the same error.
For the matrix with negative eigenvalues, how to eliminate the redundant variables?

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Linear Algebra에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by