Scilab Function

grand - Random number generator(s)

Calling Sequence

Y=grand(m, n, dist_type [,p1,...,pk])
Y=grand(X, dist_type [,p1,...,pk])
Y=grand(n, dist_type [,p1,...,pk])
S=grand(action [,q1,....,ql])

Parameters

Description

This function may be used to generate random numbers from various distributions. In this case you must apply one of the three first forms of the possible calling sequences to get an m x n matrix. The two firsts are equivalent if X is a m x n matrix, and the third form corresponds to 'multivalued' distributions (e.g. multinomial, multivariate gaussian, etc...) where a sample is a column vector (says of dim m) and you get then n such random vectors (as an m x n matrix). The last form is used to undertake various manipulations onto the base generators like changing the base generator (since v 2.7 you may choose between several base generators), changing or retrieving its internal state (seeds), etc ... These base generators give random integers following a uniform distribution on a large integer interval (lgi), all the others distributions being gotten from it (in general via a scheme lgi -> U([0,1)) -> wanted distribution).

getting random numbers from a given distribution

set/get the current generator and its state

Options specific to clcg4

Test example for clcg4

Authors, References

See Also