Documentation Center

  • Trial Software
  • Product Updates
我们为许可用户提供了部分翻译好的中文文档。您只需登录便可查阅这些文档

Random Number Generation

Seeds, distributions, algorithms

Start Here

Use the rand, randn, and randi functions to create sequences pseudorandom numbers. Use the rng function to control the repeatability of your results. Use the RandStream class when you need more advanced control over random number generation.

Functions

rand Uniformly distributed pseudorandom numbers
randn Normally distributed pseudorandom numbers
randi Uniformly distributed pseudorandom integers
randperm Random permutation
rng Control random number generation

Classes

RandStream Random number stream
Was this topic helpful?