%% Convert Cell Arrays to String Arrays
% As of R2018b, string arrays are supported throughout MATLAB® and MathWorks® products. Therefore it is recommended that you use string arrays instead of cell arrays of character vectors. (However, MATLAB functions that accept string arrays as inputs do accept character vectors and cell arrays of character vectors as well.)
% You can convert cell arrays of character vectors to string arrays. To convert a cell array of character vectors, use the string function.

C = {'Li','Sanchez','Jones','Yang','Larson'}
str = string(C)

%
% In fact, the string function converts any cell array, so long as all of the contents can be converted to strings.

C2 = {5, 10, 'some text', datetime('today')}
str2 = string(C2)

% Copyright 2019 The MathWorks, Inc.