Statistics Toolbox    
geornd

Random numbers from the geometric distribution

Syntax

Description

The geometric distribution is useful when you want to model the number of successive failures preceding a success, where the probability of success in any given trial is the constant P.

R = geornd(P) generates geometric random numbers with probability parameter P. The size of R is the size of P.

R = geornd(P,m) generates geometric random numbers with probability parameter P, where m is a 1-by-2 vector that contains the row and column dimensions of R.

R = geornd(P,m,n) generates geometric random numbers with probability parameter P, where scalars m and n are the row and column dimensions of R.

The parameters in P must lie on the interval [0 1].

Examples

See Also

geocdf, geoinv, geopdf, geostat


  geopdf geostat