Tuesday, July 15, 2014

How to Create Zero Mean white Gaussian Noise in MATLAB

You can create zero mean Gaussian Noise using the randn function. It is also known as white noise.
See the following script.

row=100;
col=100;
rng(456789); % just an arbitrary number to set the seed
w = randn([row col]);
w = w - mean2(w); % subtracting mean
w = w / std2(w); % Scaling to have standard deviation of 1
view raw white_noise hosted with ❤ by GitHub

No comments:

Post a Comment

Please ask if anything is not clear enough..........