estimate the autocorrelation function of white gaussian noise with variance 1

estimate the autocorrelation function of white gaussian noise with variance 1

2 Comments

t=0:1000;
x=randn(1,length(t));
subplot(2,1,1);
plot(t,x);
ylabel('Amplitude');
xlabel('Time sample');
title('Gaussian noise signal');
t2=-fliplr(t);
nl=min(t)+min(t2);
nh=max(t)+max(t2);
t=nl:1:nh;
y=xcorr(x,x);
subplot(2,1,2);
plot(t,y);
ylabel('Correlation output');
xlabel('Delay');
title('Autocorrelation of AWGN');

Sign in to comment.

Answers (1)

Use randn() to generate the WGN sequence and xcorr() to estimate the autocorrelation sequence.
See the help for both functions.

Categories

Find more on Signal Processing Toolbox in Help Center and File Exchange

Asked:

on 4 Dec 2011

Commented:

on 27 Feb 2020

Community Treasure Hunt

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

Start Hunting!