Takes two signal vectors as inputs and produces a mixture signal at a desired SNR level (dB). Includes various examples.
Hi ARA, this function takes signal and noise _samples_ as input vectors from the user, i.e., you have to provide noise samples, these are not internally generated by the function. Hope that makes sense.
Please also see the description and simple usage example in the addnoise() function header: https://www.mathworks.com/matlabcentral/fileexchange/32136-add-noise/content/addnoise/addnoise.m
thanks for the file exchange. pls describe what kind of noise this function will add to the signal? white? Gaussian?
randi = @(n)( round(1+(n-1)*rand) );
to support older MATLAB releases.
Relaxed sanity check to:
assert( abs(SNR(signal,noisy)-snr) < 1E10*eps(snr) );
Updated icon transparency on package description.