Hello everyone, If i have a vector like A = [1 2 3 4 5 6.......30] and i want to pick a random value from this vector A. How can i do that. Thank you so much.

 Réponse acceptée

Guillaume
Guillaume le 10 Jan 2015
A(randi(numel(A))

1 commentaire

Aftab Ahmed Khan
Aftab Ahmed Khan le 10 Jan 2015
Thank you, it worked the way i wanted it to. take care.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

Community Treasure Hunt

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

Start Hunting!

Translated by