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 次查看(过去 30 天)
Is there a function like that?

采纳的回答

madhan ravi
madhan ravi 2019-2-10
yourlist(randi(numel(yourlist)))
  3 个评论

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Get Started with MATLAB 的更多信息

标签

Community Treasure Hunt

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

Start Hunting!

Translated by