


% -*- texinfo -*-
% @deftypefn {Function File} {@var{y} =} awgn (@var{x},@var{snr})
% @deftypefnx {Function File} {@var{y} =} awgn (@var{x},@var{snr},@var{pwr})
% @deftypefnx {Function File} {@var{y} =} awgn (@var{x},@var{snr}, @var{pwr},@var{seed})
% @deftypefnx {Function File} {@var{y} =} awgn (@var{...}, '@var{type}')
%
% Add white Gaussian noise to a voltage signal.
%
% The input @var{x} is assumed to be a real or complex voltage signal. The
% returned value @var{y} will be the same form and size as @var{x} but with
% Gaussian noise added. Unless the power is specified in @var{pwr}, the
% signal power is assumed to be 0dBW, and the noise of @var{snr} dB will be
% added with respect to this. If @var{pwr} is a numeric value then the signal
% @var{x} is assumed to be @var{pwr} dBW, otherwise if @var{pwr} is
% 'measured', then the power in the signal will be measured and the noise
% added relative to this measured power.
%
% If @var{seed} is specified, then the random number generator seed is
% initialized with this value
%
% By default the @var{snr} and @var{pwr} are assumed to be in dB and dBW
% respectively. This default behaviour can be chosen with @var{type}
% set to 'dB'. In the case where @var{type} is set to 'linear', @var{pwr}
% is assumed to be in Watts and @var{snr} is a ratio.
% @end deftypefn
% @seealso{randn,wgn}