MATLAB: How to covert a cell to multiple line string

cell arraysstring conversion

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 ?

Best Answer

If you use CHAR you get a CHAR matrix padded with blanks on the right side. You can get "multi-line" also by inserting line breaks:
CellString = {'some'; 'strings'; 'to'; 'convert'; 'to'; 'a'; 'char'; 'array'}
CharString = sprintf('%s\n', CellString{:});