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?
采纳的回答
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!