how can I replace number cell array with character?
Afficher commentaires plus anciens
Hi guys,
I am trying to preapare a card game also I have created a deck that inclued 52 element and 13 diffrent value, my purpose creating a defined card array like Q instead of 12 in the 2x5 cell array.
image(2,5) = {''};
for upp=1:2
for app=1:5
chosen=BB(upp,app);
if chosen<36
image(upp,app)='Basic card';
elseif chosen<=40 && chosen>=36
image(upp,app)='A';
elseif chosen<=44 && chosen>=40
image(upp,app)='J';
elseif chosen<=48 && chosen>=40
image(upp,app)='Q';
elseif chosen<=52 && chosen>=48
image(upp,app)='K';
end
end
end
I have this error;
Conversion to cell from char is not possible.
thanks
Réponse acceptée
Plus de réponses (0)
Catégories
En savoir plus sur Convert Image Type 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!