Think of: spectral power density (for example in dBm/Hz), or spectral voltage density (for example nV/rt(Hz) ),
Frequency range (for example center frequency and bandwidth), flatness within the frequency range, sampling frequency, etc.
You can generate N samples of complex white Gaussian noise with power sigma2 in Matlab or GNU Octave using the randn function:
Code:
n = (randn(1,N) + 1j*randn(1,N))*sqrt(sigma2/2);
To check the sample power of this noise is approximately equal to sigma2 (for sufficiently large N), you can then use:
Code:
Pn = n*n'/N
So, to get your SNR of 15dB, you first need to know the power of your signal. Then, you must set the noise power at 15dB below this. Putting this together:
Code:
% An example signal: complex exponential
N = 1000;
t = linspace(0,5,N);
s = exp(1j*2*pi*t);
% Sample power of signal
Ps = s*s'/N;
% Generate noise
SNRdb = 15;
sigma2 = Ps/10^(SNRdb/10);
n = (randn(1,N) + 1j*randn(1,N))*sqrt(sigma2/2);
% Add noise to signal
x = s + n;
% Plot noisy signal
plot(t, real(x));
hold on;
plot(t, imag(x), 'r');
legend('real(x)', 'imag(x)');