i want produce a random number between 2 and 10 for example...

1 Ansicht (letzte 30 Tage)
how can produce a random integer number that are not started with 1?

Akzeptierte Antwort

Azzi Abdelmalek
Azzi Abdelmalek am 19 Okt. 2013
2+rand*(10-2)

Weitere Antworten (1)

LY Cao
LY Cao am 19 Okt. 2013
randi(9)+1

Kategorien

Mehr zu Creating and Concatenating Matrices 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