I need to know if there is a any function in matlab to choose random numbers from a given list. The list is given by the user. Suppose the list is (4,9,10,18,2) each time I want one value to be taken for calculation what function do I use?

2 vues (au cours des 30 derniers jours)
Is there a function like that?

Réponse acceptée

madhan ravi
madhan ravi le 10 Fév 2019
yourlist(randi(numel(yourlist)))
  3 commentaires
Kamali M
Kamali M le 12 Fév 2019
Sir
out of a list if I want to take each element in an order then what function do I use?

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Logical dans Help Center et File Exchange

Tags

Community Treasure Hunt

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

Start Hunting!

Translated by