Home > freetb4matlab > statistics > distributions > discrete_rnd.m

discrete_rnd

PURPOSE ^

% Generate a row vector containing a random sample of size @var{n} from

SYNOPSIS ^

function rnd = discrete_rnd (v, p, r, c)

DESCRIPTION ^

% -*- texinfo -*-
% @deftypefn {Function File} {} discrete_rnd (@var{n}, @var{v}, @var{p})
% @deftypefnx {Function File} {} discrete_rnd (@var{v}, @var{p}, @var{r}, @var{c})
% @deftypefnx {Function File} {} discrete_rnd (@var{v}, @var{p}, @var{sz})
% Generate a row vector containing a random sample of size @var{n} from
% the univariate distribution which assumes the values in @var{v} with
% probabilities @var{p}.  @var{n} must be a scalar.
%
% If @var{r} and @var{c} are given create a matrix with @var{r} rows and
% @var{c} columns.  Or if @var{sz} is a vector, create a matrix of size
% @var{sz}.
% @end deftypefn

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:
Generated on Sat 16-May-2009 00:04:49 by m2html © 2003