How to join the elements of char array?
1 回表示 (過去 30 日間)
古いコメントを表示
I have an array with size not fixed depends on the inputs from the user. It is eg. 8X2 char array. I want to combine the array in 1 string.
eg. If it consists 61 62 63 64 65
I want a string of the form "6162636465"
Plz help as soon as possible.
0 件のコメント
回答 (1 件)
Andrei Bobrov
2013 年 3 月 31 日
a=[61 62 63 64 65]
out = sprintf('%d',a)
参考
カテゴリ
Help Center および File Exchange で Characters and Strings についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!