라이선스가 부여된 사용자만 번역 문서를 볼 수 있습니다. 번역 문서를 보려면 로그인하십시오.

Random Number Generation

Seeds, distributions, algorithms

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.


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


RandStream Random number stream
Was this topic helpful?