Generate noise using Box muller meathod
15 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Ronak Sakaria
am 8 Jun. 2012
Kommentiert: Ali Sabra
am 24 Okt. 2019
What are the other meathod for generating Guassian Noise?
I wrote code for Box muller like:
noise = rand(2,length(data));
AWGN_noise = zeros(1,length(data));
for i1=1:length(data)
AWGN_noise(i1) = sigma_noise * sqrt(-2*log(noise(1,i1)))*cos(2*pi*noise(2,i1));
end
The thing is that I'm not getting much variance in values after Box Muller Transformation. Suggest me some good code to generate guassian noise.
0 Kommentare
Akzeptierte Antwort
the cyclist
am 8 Jun. 2012
If I set sigma_noise to 1, then the variance of your noise is also 1, exactly as I would expect. (See for example http://en.wikipedia.org/wiki/Box%E2%80%93Muller_transform.) If you increase the value of sigma_noise, then you'll get more variance.
Also, your code can be vectorized to have a significant speedup. Replace your for loop with:
AWGN_noise = sigma_noise * sqrt(-2*log(noise(1,:))).*cos(2*pi*noise(2,:));
4 Kommentare
Ali Sabra
am 24 Okt. 2019
Hello everyone,
Can anybody body tell me how to change mean of the generated Gaussian RV using this method ?
Weitere Antworten (1)
Siehe auch
Kategorien
Mehr zu QPSK finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!