How to covert a cell to multiple line string?
显示 更早的评论
I have a cell with one coloumn and varing number of rows. The cell contains alpha-numeric string. I want to convert this cell into a multiple line string with each cell content as one line of the string.
How can this be acheived ?
1 个评论
Jan
2016-9-26
Cells are arrays. Therefore all columns have the same number of rows. I assume, the contents of the cell elements are char vectors with a different number of clumns.
采纳的回答
更多回答(1 个)
Guillaume
2016-9-26
Use char:
cellarrayofstring = {'some'; 'strings'; 'to'; 'convert'; 'to'; 'a'; 'char'; 'array'}
chararrayofstring = char(cellarrayofstring)
类别
在 帮助中心 和 File Exchange 中查找有关 Characters and Strings 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!