how to generate a random number between the range -50 to 50?
4 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
a=rand(1,[-50,50])
0 commentaires
Réponses (1)
Andrei Bobrov
le 28 Juil 2017
Modifié(e) : Andrei Bobrov
le 28 Juil 2017
a = 10*(rand()-.5)
or integer namber
a = randi([-50,50])
0 commentaires
Voir également
Catégories
En savoir plus sur Random Number Generation dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!