random numbers in between two ranges

hi
i want one random number generated between two ranges Like 20 and 50. i there any command who can do this. kindly help me
regards

 Respuesta aceptada

Azzi Abdelmalek
Azzi Abdelmalek el 13 de Jun. de 2015
Editada: Azzi Abdelmalek el 13 de Jun. de 2015
a=20
b=50
n=1000
v=a+(b-a)*rand(1,n)

Más respuestas (0)

Categorías

Más información sobre Random Number Generation en Centro de ayuda y File Exchange.

Productos

Etiquetas

Preguntada:

el 13 de Jun. de 2015

Comentada:

el 13 de Jun. de 2015

Community Treasure Hunt

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

Start Hunting!

Translated by