Random Number

  • Contact sales
  • Trial Software

Generate pseudorandom and quasi-random numbers

Statistically random numbers exhibit no predictable pattern or regularity. Sequences of statistically random numbers are used to simulate complex mathematical and physical systems.

MATLAB and Simulink provide random number generators to approximate either a normal distribution or a uniform distribution. You can specify the algorithm as well as the starting seeds, which allows you to precisely replicate your results. MATLAB uses the Mersenne twister as its default RNG. However, you can also choose from other generators including a multiplicative lagged Fibonacci generator and a combined multiple recursive generator.

Many types of Monte Carlo simulation require random number sequences that approximate more exotic distributions such as a custom nonparametric distribution in a high-dimensional space. Statistics Toolbox, for use with MATLAB, provides tools for these scenarios:

  • Generators for 27 additional univariate distributions including Weibull, gamma, and Poisson, as well as nonparametric distributions
  • Copula based techniques for multivariate distributions
  • Markov Chain Monte Carlo simulation including slice sampling and the Metropolis Hastings algorithm

Statistics Toolbox also supports quasi-random number generation for space-filling designs.

Examples and How To

Software Reference

See also: machine learning, smoothing, data analysis, mathematical modeling