How to select a random number from set 5:20:2000?

1 visualización (últimos 30 días)
Dayalram Dayalram
Dayalram Dayalram el 8 de Jun. de 2019
Editada: KALYAN ACHARJYA el 8 de Jun. de 2019
How to select a random number from set 5:20:2000?

Respuesta aceptada

KALYAN ACHARJYA
KALYAN ACHARJYA el 8 de Jun. de 2019
Editada: KALYAN ACHARJYA el 8 de Jun. de 2019
idx=5:20:2000;
rand_num=idx(randi(length(idx)));

Más respuestas (0)

Categorías

Más información sobre Random Number Generation en Help Center y File Exchange.

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by