How can I randomly select one variable between 3 variables?
3 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Hwajin Choi
le 28 Fév 2022
Commenté : Hwajin Choi
le 28 Fév 2022
I want to randomly select 1 variable between variables 10, 20, and 30.
This is what I did and it failed.
a = [10:10:30]
rand(a)
It gives me numerous floats. I want to get 10 or 20 or 30.
Thank you for your help.
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Resizing and Reshaping Matrices dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!