You are now following this Submission
- You will see updates in your followed content feed
- You may receive emails, depending on your communication preferences
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 (2026). Random Integer Generator (https://www.mathworks.com/matlabcentral/fileexchange/18443-random-integer-generator), MATLAB Central File Exchange. Retrieved .
Acknowledgements
Inspired by: MYRANDINT -- Random Integer Generation
Inspired: Generate uniform pseudo-random integers from linear range.
General Information
- Version 1.1.0.0 (6.74 KB)
MATLAB Release Compatibility
- Compatible with any release
Platform Compatibility
- Windows
- macOS
- Linux