Random Number generation with defined decimal points

5 visualizzazioni (ultimi 30 giorni)
I have a limit between 1.4 and 2.5, so i need ot generate random number between these limits.

Risposte (2)

Bhaskar R
Bhaskar R il 6 Feb 2020
num = ( 2.5 - 1.4)*rand + 1.4;

Walter Roberson
Walter Roberson il 6 Feb 2020
rand*1.1+1.4

Categorie

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

Prodotti


Release

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by