MATLAB: How can I find the value which is randomly chose from a vector

random

the vector such as A=[1 2 4 8 9 10],I want to randomly choose one of them, how can I do?

Best Answer

x = A(randi(numel(A)));