%% Convert String Array
% Starting in R2017a, you can create string arrays using double quotes. Also, a string array can have missing values, displayed as <missing>, without quotation marks.

str = ["plane","jet","plane","helicopter",missing,"jet"]

%
% Convert string array str to a categorical array. The categorical function converts missing strings to undefined categorical values, displayed as <undefined>.

C = categorical(str)

%
%
% Copyright 2012 The MathWorks, Inc.