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

1 view (last 30 days)
how can produce a random integer number that are not started with 1?

Accepted Answer

Azzi Abdelmalek
Azzi Abdelmalek on 19 Oct 2013
2+rand*(10-2)

More Answers (1)

LY Cao
LY Cao on 19 Oct 2013
randi(9)+1

Categories

Find more on Random Number Generation in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!