Filter löschen
Filter löschen

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

13 Ansichten (letzte 30 Tage)
example
a=5
y=randi(number)>=a

Antworten (1)

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

Kategorien

Mehr zu Random Number Generation finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by