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에서 Creating and Concatenating Matrices에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!