Skip to content

Integrate white noise

17/07/2011

It is suppose the matlab function “randn” can give a zeros mean Gaussian distributed random number. If we add many this kind of number together, what we will get? will the sum approach to zero? The following is a simple example. The answer is no.

clc;clear;close all
num=100000;
sum=zeros(1,num);
for i=2:num
    sum(i)=sum(i-1)+randn;
end
plot([1:num],sum)

Advertisements
No comments yet

Leave a Reply

Please log in using one of these methods to post your comment:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: