I want to add complex wgn to a signal for a specified SNR. I have been using the following lines:
SNR = -10:5:50;
for l = 1:length(SNR)
SignalN = awgn(Signal, SNR(l),'measured','dB');
end
where $Signal$ is the actual complex damped signal and the $SNR$ is in dB. I want to replace the above line with $randn$ function in MATLAB that considers the definition of WGN and SNR in dB. can someone help me with this?
edit awgn.m
and you access to the source code of theawgn()
function. $\endgroup$awgn()
, it does userandn()
. $\endgroup$