Merging Cell Array Elements in One Element
1 次查看(过去 30 天)
显示 更早的评论
Hello,
I have a cell array and its elements are like
1x4 cell array
{'1A'}
{'2B'}
{'3C'}
{'4D'}
I don't want to access them seperately, what I want is merge them like
1x1 cell array
{'1A2B3C4D'}
so that I can convert it to decimal easily. How can I do that? Thank you.
0 个评论
采纳的回答
VINAYAK LUHA
2022-6-3
Hi ,
CellArr ={'1A','2B','3C','4D'}
MergedCellArr = [CellArr{:}]
DecValue = hex2dec(MergedCellArr)
0 个评论
更多回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Matrices and Arrays 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!