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

2 vues (au cours des 30 derniers jours)
Dayalram Dayalram
Dayalram Dayalram le 8 Juin 2019
How to select a random number from set 5:20:2000?

Réponse acceptée

KALYAN ACHARJYA
KALYAN ACHARJYA le 8 Juin 2019
Modifié(e) : KALYAN ACHARJYA le 8 Juin 2019
idx=5:20:2000;
rand_num=idx(randi(length(idx)));

Plus de réponses (0)

Catégories

En savoir plus sur Random Number Generation dans Help Center et File Exchange

Produits


Version

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by