g05fef

g05fef © Numerical Algorithms Group, 2002.

Purpose

G05FEF Generates a vector of pseudo-random numbers from a beta distribution

Synopsis

[x,ifail] = g05fef(a,b,n<,ifail>)

Description

 
 The beta distribution has PDF (probability density function):
 
           (Gamma)(a+b)     a-1     b-1
 f(x)= --------------------x   (1-x) if 0<=x<=1; a,b>0.0
       (Gamma)(a)(Gamma)(b)         
 
 f(x)=0                    otherwise.
 

Parameters

g05fef

Required Input Arguments:

a                                     real
b                                     real
n                                     integer

Optional Input Arguments:                       <Default>

ifail                                 integer  -1

Output Arguments:

x (n)                                 real
ifail                                 integer