Effacer les filtres
Effacer les filtres

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

13 vues (au cours des 30 derniers jours)
Bashir Yusuf Bichi
Bashir Yusuf Bichi le 21 Mar 2018
Modifié(e) : James Tursa le 21 Mar 2018
example
a=5
y=randi(number)>=a

Réponses (1)

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

Catégories

En savoir plus sur Random Number Generation dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by