MATLAB: Convert cell to string

cellconvertstring

I have a cell (721*1), each cell composed by a different number of string, for example, the first cell is a (1*20) string. I want to convert this cell to string. when I use string function, it reported an error as "Conversion from cell failed. Element 1 must be convertible to a string scalar.". I have no idea why it can't convert as the string function described in Matlab.

Best Answer

So what is that conversion from cell array to string supposed to do? What do you want as an output?
Assuming it's a 1xN string array that is simply the concatenation of all the string arrays in your cell array, then:
sarray = [A{:}]
The above will fail if at least one string array in any cell does not have the same number of rows as all the other string arrays.