the first equation represents complex baseband noise of variance = 1.
In the second equation, the premultiplying term to noise is square root of variance (if signal power =1) by the formula.. SNR_dB=10*log(1/noise_variance)
randn function is standard gaussian which has mean=0 and variance= 1, so when you calculate the overall variance of n it wiil be 1.
and " -SNR and why divide by 20." is answered by the equation
noise_standard_deviation=10.^(-SNR_dB/20)
because
SNR_dB=10*log(base 10)(1/noise_variance).
standard deviation= sqrt(variance)
Hi Pulkit, why would we want the noise variance to be equal to 1. also have ever used the awgn function in matlab? when i used the function, my results are not correct but when using the equation u explained, my results are fine even though i don,t quite get why it works. regards
its not necessary that we want noise variance equal to one as you are changing your noise variance by the equation
10.^(-SNR_dB/20)*n.. where the premultiplying term to n is sqrt(noise variance) as i told earlier...
for h = 1/sqrt(2)*[randn(1,N) + j*randn(1,N)]; % Rayleigh channel
why this equation for rayleigh fading? follow any book on rayleigh fading.
the magnitude of this complex sum of two gaussian signals is rayleigh distributed and phase is uniformly distributed..
Rayleigh fading channel means magnitude is rayleigh distributed and phase is uniformly distributed.
do u have the matlab code for gaussian noise generation without wgn or awgn functions.....i would like to generate statistical noise and i think the above functions are related to random noise....that is why i asked for a code other than the functions...
but 'randn' generates random noise na...? i wanna get statistical noise...
so will it be better to use this equation which creates gaussian distribution..?
Do you have any idea about what the below expression means...? I read that it generates same random noise everytime you run the program...but what is the signaficance with the '0' in this expression?
So can we use randn('state',2) and so...if yes wht diz 0,1,2 etc.. .. .signify?
whn i use this, am getting same random numbers generated eveytime i run the code...what is its relation with the command??
hi Lekshmi B S ,
0,1,2 etc.. represent to the initial value of random number genrator every time you repeat identifing the generator you will take the same answer like...
>>randn('state',2)
>>a=randn(1)
a=1.7491
>>a=randn(1)
a=0.1326
>>randn('state',2).................................% define the initial value of random number genrato again
>>a=randn(1)
a=1.7491............................................%.the same answer as first