how to join 3 strings into single string?
2 ビュー (過去 30 日間)
古いコメントを表示
採用された回答
その他の回答 (1 件)
Nicolaie Popescu-Bodorin
2017 年 4 月 2 日
res = strCell{1};
for k=2:length(strCell),
res=[res '-' strCell{k}];
end;
disp(res);
1 件のコメント
Stephen23
2017 年 4 月 2 日
This expands the output res on each iteration, which is not efficient:
See my answer for a simpler and more efficient solution that does not use a loop.
参考
カテゴリ
Help Center および File Exchange で Matrix Indexing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!