Generate random numbers from a vector

I would like Matlab to give me a number from a given row vector, such as:
A=[1 3 5 9 100 150 658 999];
Matlab would either give me 1,3,5,9,100,150,658, or 999 in a random manner.(Only one output.)
How can I do this? Many thanks.

 采纳的回答

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Random Number Generation 的更多信息

产品

版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by