Azzera filtri
Azzera filtri

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

13 visualizzazioni (ultimi 30 giorni)
example
a=5
y=randi(number)>=a

Risposte (1)

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

Categorie

Scopri di più su Random Number Generation in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by