Trying to learn Rand - help get me started
Afficher commentaires plus anciens
Hi, I'm trying to learn Matlab so I be more useful as an intern. Looking through the book I bought theres some practice - i have trouble with the following one, which is a "try this" problem and do they don't actually tell you how to do it:
Use an Array of characters 'A234567890JQK' to display a single random playing card. Hint: use a random number as an index value. Note that A = ace, 0 = 10, J = jack, Q = queen, and K = king. In oter words, your expression should randomly display a single character in the array.
So far I know how to put numbers in arrays, but characters? Can someone explain a way how to do so?
Thanks
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Get Started with MATLAB dans Centre d'aide et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!