I want to know the difference between the two Gaussian noises generated below? Which one is white and how can i make the other one white?
y=wgn(1,10000,0)
and
y=randn(1,10000);
A white noise sequence is one for which each (random) element is uncorrelated from every other element: $$ E[y[n]y[m]] = \left \{ \begin{array}{ll} 0 & \mbox{for } n\not=m\\ \sigma_y^2 & \mbox{for } n = m \end{array} \right . \\= \sigma_y^2 \delta[n-m] $$ where $\sigma^2_y$ is the variance of $y$.
Note that I am assuming (because of the whiteness) that the signal is zero mean.
The whiteness of a signal says nothing about the distribution of its values. To know something about that, Gaussianity or some other distribution needs to be invoked.
The functions wgn
and randn
both produce white, Gaussian noise sequences.
Calling the function rand
would produce a white, uniformly distributed noise sequence.
wgn() is specifically meant to create a white noise with a predefined power levels while randn() is meant to generate normally distributed random numbers WITHOUT specifying the power. You will have to scale the values generated from randn() to meet the desired noise power level. Basically wgn() (usually used with awgn()) makes your life easier if you want to create a noise with known power level.
Hope this helps!
randn
produces independent samples of a Gaussian random variable, which happens to be the same as Gaussian white noise. Note that this white noise is actually filtered to fit in the bandwidth specified by the sampling rate. $\endgroup$