How do you convert the content of one cell of a character/cell array to a string?
조회 수: 1 (최근 30일)
이전 댓글 표시
How do you convert the content of one cell of a character/cell array to a string?
댓글 수: 1
채택된 답변
Ameer Hamza
2018년 5월 8일
편집: Ameer Hamza
2018년 5월 8일
string(cellArray);
To combine them all in one string use
strjoin(cellArray)
댓글 수: 4
Guillaume
2018년 5월 8일
@eliah,
You seem to be using very imprecise terms to describe the type of your data. A structure array has a very precise meaning in matlab. So does cell array. They're two very different types and also completely different from what is shown in you screenshot, a char array.
Someone of you proposed: NumberOfCell=find(cellfun(@strcmp,...
That's very convoluted. It is very likely that a simple regexp is all that is needed but more details needed on the input and desired output.
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Data Type Conversion에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!