Hi, in my program I have something like this : A = {'hello, ' 'how ' 'are ' 'you ' 'today' '?'};
And I would like to merge all those strings into one big :
B = 'hello how are you today?' B must be a string, not a cell.
Thanks you for your help

 채택된 답변

the cyclist
the cyclist 2017년 3월 8일
편집: the cyclist 2017년 3월 8일

10 개 추천

strjoin(A)
will create a character array.
string(strjoin(A))
will create a string.

추가 답변 (1개)

Christine Berlingeri
Christine Berlingeri 2021년 9월 18일

0 개 추천

A = [1, 2, 3, 4, 4]
B = string(strjoin(A))

카테고리

도움말 센터 및 File Exchange에서 Characters and Strings에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by