How to generate random number within a range?

1 visualizzazione (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)

Categorie

Scopri di più su Random Number Generation in Help Center e File Exchange

Tag

Community Treasure Hunt

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

Start Hunting!

Translated by