how can I replace number cell array with character?
显示 更早的评论
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
采纳的回答
更多回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Convert Image Type 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!