how to generate a random number between the range -50 to 50?
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
a=rand(1,[-50,50])
0 Commenti
Risposte (1)
Andrei Bobrov
il 28 Lug 2017
Modificato: Andrei Bobrov
il 28 Lug 2017
a = 10*(rand()-.5)
or integer namber
a = randi([-50,50])
0 Commenti
Vedere anche
Categorie
Scopri di più su Random Number Generation 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!