Extracting data form a single cell
3 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Cole Kleinow
am 14 Feb. 2021
Beantwortet: James Tursa
am 14 Feb. 2021
so I am able to make the deck but I need to take this and get the suit out (second number) to find what suit it is and count it
Deck = [];
for rank = 1:13
for suit = 1:4
cardval = [rank suit];
Deck = [Deck, {cardval}];
end
end
Shuffled = Deck(randperm(length(Deck)));
Draw = Shuffled(1,1);
0 Kommentare
Akzeptierte Antwort
Weitere Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!