Why is this function used to generate white gaussian noise
10 views (last 30 days)
Show older comments
n = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)];
0 Comments
Answers (2)
Walter Roberson
on 24 Aug 2012
The code generates random complex numbers and normalizes them to a maximum of 1 unit of magnitude.
What is the context, such that complex signals are appropriate?
0 Comments
Daniel Shub
on 24 Aug 2012
One of the neat properties of Gaussian noise is that the real and imaginary components of the Fourier transform of a Gaussian noise are Gaussian. If you are working in the frequency domain, your code is identical, in a stochastic sense, to
n = fft(randn(1, N));
but obviously more efficient.
If you are interested in the magnitudes and phases of the components, instead of the real and imaginary components, you could create the Gaussian noise by creating magnitudes which are Rayleigh distributed and phases which are uniformly distributed.
0 Comments
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!