%% Determine if Array Contains String Values
% Create different arrays, and then determine if they are string arrays.
% Test a character vector.

chr = 'Mary Jones'

%

tf = isstring(chr)

%
% Character vectors are not strings, so isstring returns 0.
% Test a string array. Starting in R2017a, you can create strings using double quotes.

str = ["Smith","Chung","Morales"; ...
       "Sanchez","Peterson","Adams"]

%

tf = isstring(str)

% str is a string array, so isstring returns 1.
% Copyright 2012 The MathWorks, Inc.