Home > freetb4matlab > comm > randerr.m

randerr

PURPOSE ^

%

SYNOPSIS ^

function b = randerr (n, m, err, seed)

DESCRIPTION ^

% -*- 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

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Fri 22-May-2009 15:13:00 by m2html © 2003