Skip to content

randbetween

Uniform random integer in a range.

v = randbetween(bottom, up)

Returns a uniform random integer in [bottom, up] (both endpoints inclusive). Same distribution as randi([bottom, up]).

randbetween(1, 10)
  • randi — Uniformly distributed random integers.
  • rand — Uniformly distributed random numbers in [0, 1].
  • randarray — Array of uniform random values.