Home > freetb4matlab > comm > randsrc.m

randsrc

PURPOSE ^

%

SYNOPSIS ^

function b = randsrc (n, m, alphabet, seed)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {@var{b} = } randsrc (@var{n})
% @deftypefnx {Function File} {@var{b} = } randsrc (@var{n},@var{m})
% @deftypefnx {Function File} {@var{b} = } randsrc (@var{n},@var{m},@var{alphabet})
% @deftypefnx {Function File} {@var{b} = } randsrc (@var{n},@var{m},@var{alphabet},@var{seed})
%
% Generate a matrix of random symbols. The size of the matrix is
% @var{n} rows by @var{m} columns. By default @var{m} is equal to @var{n}.
%
% The variable @var{alphabet} can be either a row vector or a matrix with 
% two rows. When @var{alphabet} is a row vector the symbols returned in
% @var{b} are chosen with equal probability from @var{alphabet}. When
% @var{alphabet} has two rows, the second row determines the probabilty
% with which each of the symbols is chosen. The sum of the probabilities
% must equal 1. By default @var{alphabet} is [-1 1].
%
% 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