how can I replace number cell array with character?
Show older comments
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
Accepted Answer
More Answers (0)
Categories
Find more on Convert Image Type in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!