how to generate a random number between the range -50 to 50?
7 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
a=rand(1,[-50,50])
0 comentarios
Respuestas (1)
Andrei Bobrov
el 28 de Jul. de 2017
Editada: Andrei Bobrov
el 28 de Jul. de 2017
a = 10*(rand()-.5)
or integer namber
a = randi([-50,50])
0 comentarios
Ver también
Categorías
Más información sobre Random Number Generation en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!