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?

1 visualización (últimos 30 días)
Is there a function like that?

Respuesta aceptada

madhan ravi
madhan ravi el 10 de Feb. de 2019
yourlist(randi(numel(yourlist)))
  3 comentarios
Kamali M
Kamali M el 12 de Feb. de 2019
Sir
out of a list if I want to take each element in an order then what function do I use?

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Get Started with MATLAB en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by