How to generate a random number that is greater than or equals to a given number

12 visualizaciones (últimos 30 días)
example
a=5
y=randi(number)>=a

Respuestas (1)

KSSV
KSSV el 21 de Mzo. de 2018
N = 1000 ;
a = 5;
b = 100;
r = (b-a).*rand(N,1) + a;

Categorías

Más información sobre Random Number Generation en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by