%% Convert Character Array to Cell Array
% Create a character array. Include trailing spaces so that each row has the same length, resulting in a 3-by-4 array.

A = ['abc ';'defg';'hi  ']

%

class(A)

%
% Convert the character array to a 3-by-1 cell array of character vectors.

C = cellstr(A)

%

class(C)

% Copyright 2012 The MathWorks, Inc.