image thumbnail

Random Integer Generator

version (6.74 KB) by Edward Zechmann
This program quickly outputs n random integers in the specified range from a to b.


Updated 23 Dec 2013

View License

The program quickly outputs n random integers in the range from a to b. The integers are drawn from a uniform distribution to make selection of integers equally probable.

This program is intended to be especially quick with very large ranges of integers and selecting only a very small number of those integers.

User specifies whether output is sorted or random order.

User specifies whether to remove duplicate integers or to allow duplicate integers.

Cite As

Edward Zechmann (2022). Random Integer Generator (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2007b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!