Link Search Menu Expand Document

Random Number Generators

To generate a random integer between a and b with a reasonable random number generator:

randi(a,b)

To generate a random number from a normal distribution:

randn()

To generate a random number from an uniform distribution between a and b:

rand(a,b)