Concatenate string output to another string vertically in a loop
조회 수: 10 (최근 30일)
이전 댓글 표시
Hi,
I have a loop which generate for every run a string output (loop size index is changing depends on how much files are in the directory). How can I concatenate the string output to another string vertically/send them into char/etc so I can save the final output (all the string output results) to a one text file?
Any idea is welcome.
Thanks.
댓글 수: 0
답변 (2개)
Matt J
2012년 10월 16일
Assuming you've read the strings into a cell array you can use CHAR to concatenate them, e.g.,
>> char({'car','apple'})
ans =
car
apple
댓글 수: 2
참고 항목
카테고리
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!