How to horizontally merge cells of strings/chars for each row without writing a for-loop?
1 回表示 (過去 30 日間)
古いコメントを表示
I have some m*n cells of char arrays, and the figure serves as an example for that. Is it possible to horizontally merge char arrays of each rows like 'B659' and 'Z01' to 'B659Z01' without using a for-loop to iterate each row?
0 件のコメント
採用された回答
Walter Roberson
2022 年 11 月 21 日
fmt = repmat('%s', 1, size(YourCell,2));
output = compose(fmt, string(YourCell));
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Creating and Concatenating Matrices についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!