%% Convert Missing Strings to Undefined Categorical Values
% Convert a string array with missing elements to a categorical array. Where the string array contains a missing value, the categorical array contains an undefined value.

str = ["jet","plane","helicopter"];
str(5) = "plane"

%

C = categorical(str)

% Copyright 2012 The MathWorks, Inc.