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
Kamali M
Kamali M 2019년 2월 12일
Sir
out of a list if I want to take each element in an order then what function do I use?

댓글을 달려면 로그인하십시오.

추가 답변 (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