Rearranging Bytes in a Cell
2 次查看(过去 30 天)
显示 更早的评论
So my output hexadecimal code is saved in a cell in the following format.
{'00 11 22 33 AA BB'}
I am trying to have it output as
{'1100 3322 BBAA'}
Any help would be greatly appreciated.
0 个评论
采纳的回答
更多回答(1 个)
OCDER
2018-8-9
A = {'00 11 22 33 AA BB'; '00 11 22 3D AA BC'; '02 11 32 33 AA BB'};
A = cellfun(@(x) sprintf('%c%c%c%c %c%c%c%c %c%c%c%c', strrep(x, ' ', '')), A, 'un', false);
A =
3×1 cell array
'0011 2233 AABB'
'0011 223D AABC'
'0211 3233 AABB'
2 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Language Support 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!