% -*- texinfo -*- % @deftypefn {Function File} {@var{b} = } randerr (@var{n}) % @deftypefnx {Function File} {@var{b} = } randerr (@var{n},@var{m}) % @deftypefnx {Function File} {@var{b} = } randerr (@var{n},@var{m},@var{err}) % @deftypefnx {Function File} {@var{b} = } randerr (@var{n},@var{m},@var{err},@var{seed}) % % Generate a matrix of random bit errors. The size of the matrix is % @var{n} rows by @var{m} columns. By default @var{m} is equal to @var{n}. % Bit errors in the matrix are indicated by a 1. % % The variable @var{err} determines the number of errors per row. By % default the return matrix @var{b} has exactly one bit error per row. % If @var{err} is a scalar, there each row of @var{b} has exactly this % number of errors per row. If @var{err} is a vector then each row has % a number of errors that is in this vector. Each number of errors has % an equal probability. If @var{err} is a matrix with two rows, then % the first row determines the number of errors and the second their % probabilities. % % The variable @var{seed} allows the random number generator to be seeded % with a fixed value. The initial seed will be restored when returning. % @end deftypefn