bbrand

This function is not yet fully documented. This is a transcript of the text-formatted help.

bbrand   Generate pseudo-random variates given a distribution.
   X=bbrand generates a uniformly distributed variates, e.g. a number
   distributed equally between 0<=X<=1. bbrand(M) creates a column-vector
   of length M, and bbrand([M,N]) creates an M-by-N matrix.

   bbrand is a utility-function intended to make BBTools self-contained.
   If more functionality is required, please consider acquiring the
   statistics toolbox from Mathworks.

   bbrand(M,'dist',...) or bbrand('dist',...) selects another, possibly
   parametrized, distribution. Parameters may either by a scalar, used
   for all elements, or a matrix of the same size as X.

   The following lists the available continuous distributions. The number
   in parenthesis following a parameter is the default value. Densities
   outside the specified domain are zero.
     'uniform':  Parameters: a (0), b (1)
                 Density:    f(x)=1/(b-a), a<=x<=b
     'normal':   Parameters: mu (0), sigma (1)
                 Density:    f(x)=exp(-(x-mu)^2/(2*sigma^2))/(c*sigma)
                             c=sqrt(2*pi)
     'exp':      Parameter:  theta (1)
                 Density:    f(x)=exp(-x/theta)/theta, x>=0
     'cauchy':   Parameters: mu (0), sigma (1)
                 Density:    f(x)=sigma/(pi*((x-mu)^2+sigma^2))
                 Other names: 'lorentz', 'breit-wigner'.
     'pareto':   Parameters: a (1), b (1)
                 Density:    f(x)=a*b^a/x^(a+1), x>=a
                 Other names: 'bradford'
     'rayleigh': Parameter:  s (1)
                 Density:    f(x)=x*exp(-.5*(x/s)^2)/s^2, x>=0

   NOTE: the mean and variance of the Cauchy distribution is undefined.
   We use mu and sigma as parameters because they reflect our intuition
   about the shape of the distribution.

   Support for discrete distributions is currently limited. In the
   following, i is always a non-negative integer.
     'geometric': Parameter:  p (1)
                  Density:    (1-p)^(i-1)*p, i>=1
     'poisson':   Parameter:  lambda (1)
                  Density:    P(x==i)=exp(-lambda)*lambda^i/(i!), i>=0

   Parameters can often be derived from the standard parameters: mean
   ('mean' or 'mu'), standard deviation ('std' or 'sigma'), or variance
   ('var'). The call X=bbrand(10,'exp','mu',10) creates 10 variates drawn
   an exponential distribution with mean 10.

   All distributions are based on the random functions built into
   Matlab. Reproducible results may therefore be generated by seeding.
   Please consult documentation for rand for details.

   See also , .