MATLAB: Converting cell array full of characters to a string

cell arraystring

This is probably easy but I can't figure it out. I have a cell array where each entry is a character. I want to convert this cell array to a string because the characters in the cell array form a sentence. I tried char(array) which sort of works except it displays the string vertically instead of horizontally.

Best Answer

How about:
A = {'the';'quick';'brown';'fox'}
char(A)
or
char(cellfun(@transpose,A,'uni',false))
etc depending on how you want to convert it.