필터 지우기
필터 지우기

psudo random sequences

조회 수: 1 (최근 30일)
kush
kush 2012년 3월 22일
how to generate 2 uncorrelated psudo random sequence

채택된 답변

Wayne King
Wayne King 2012년 3월 22일
Can't you just call the random number generator twice
x = randn(1e3,1);
y = randn(1e3,1);
If you look at the cross-correlation sequence of those two sequences you can show they are uncorrelated.
For example, let's compute the cross-correlation sequence and place approximate 95%-confidence intervals.
[xc,lags] = xcorr(x,y,20,'coeff');
lconf = -1.96/sqrt(length(x));
upconf = 1.96/sqrt(length(x));
stem(lags,xc,'markerfacecolor',[0 0 1]);
set(gca,'ylim',[lconf-0.03 1.05]);
hold on;
line(lags,lconf*ones(size(lags)),'color','r','linewidth',2);
line(lags,upconf*ones(size(lags)),'color','r','linewidth',2);
They look uncorrelated to me.
There are more advanced things you can do, but do you need that?

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Correlation and Convolution에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by