generate a correlated normal distribution
조회 수: 7 (최근 30일)
이전 댓글 표시
Dear ALL
Is there any fucntion in Matlab that allow me to generate a correlated normal distribution sequence .
Can you help me ...
BR
댓글 수: 0
채택된 답변
Wayne King
2013년 8월 26일
편집: Wayne King
2013년 8월 26일
Not sure what you mean by "one sequence correlated together with normal distribution"
You can generate a sequence that follows a particular normal distribution with randn()
For example, to generate a sequence that follows a N(0,1)
N = 1000;
x = randn(1000,1);
To generate a sequence that follows a N(mu,sigma^2) distribution
mu = 5;
sigma = 2;
x = mu+ 2*randn(1000,1);
These sequences will be white-noise sequences though. In other words, there will not be any autocorrelation (the individual sequence values will be mutually uncorrelated)
You can introduce any variety of autocorrelation by filtering the sequence. For example, to generate a lowpass AR(1) process.
A = [1 -0.9];
x = randn(1000,1);
y = filter(1,A,x);
The sequence y will show autocorrelation.
추가 답변 (1개)
the cyclist
2013년 8월 25일
편집: the cyclist
2013년 8월 25일
If you have the Statistics Toolbox, it is particularly easy. Use the mvnrnd() function.
참고 항목
카테고리
Help Center 및 File Exchange에서 Random Number Generation에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!