How to generate random number within a range?

3 visualizzazioni (ultimi 30 giorni)
I want to generate a random number between 0.2 to 1

Risposta accettata

Stephen23
Stephen23 il 27 Gen 2020
>> 0.2+(1-0.2)*rand()
ans =
0.85178

Più risposte (0)

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by