Random Number Generation

Random integers (positive as well as negative) can be generated.

You are now following this Submission

Random numbers (positive as well as negative) can be generated. Occurrence of each number generated is equally likely. For example, if you want to generate integers from 2 to 21, the numbers from 2 to 21 will be generated with equal chance of occurrence. Instead of 3.4563 as a random number, 3 will be generated. The file has been tested using probability rule of occurrence of numbers.

Cite As

Aamir Alaud-din (2026). Random Number Generation (https://www.mathworks.com/matlabcentral/fileexchange/34887-random-number-generation), MATLAB Central File Exchange. Retrieved .

Categories

Find more on Random Number Generation in Help Center and MATLAB Answers

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0