Proper way to add noise to signal
In many areas I have found that while adding noise, we mention some specification like zero mean and variance. I need to add AWGN, colored noise, uniform noise of varying SNR in Db. The following code shows the way how I generated and added noise. I am aware of the function awgn() but it is a kind of black box thing without knowing how the noise is getting added. So, can somebody please explain the correct way to generate and add noise. Thank you SNR = [-10:5:30]; %in Db snr = 10 .^ (0.1 .* SNR); for I = 1:length(snr) noise = 1 / sqrt(2) * (randn(1, N) + 1i * randn(1, N)); u = y + noise .* snr