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

1 visualizzazione (ultimi 30 giorni)
how can produce a random integer number that are not started with 1?

Risposta accettata

Azzi Abdelmalek
Azzi Abdelmalek il 19 Ott 2013
2+rand*(10-2)

Più risposte (1)

LY Cao
LY Cao il 19 Ott 2013
randi(9)+1

Categorie

Scopri di più su Creating and Concatenating Matrices 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