%% Compare String Arrays
% Starting in R2017a, you can create strings using double quotes. Compare string arrays using strcmp.

s1 = ["A","bc";
      "def","G"];
s2 = ["B","c";
      "def","G"];

tf = strcmp(s1,s2)

%
% You can compare and sort string arrays with relational operators, just as you can with numeric arrays.
% Use == to determine which elements of two string arrays are equal.

s1 == s2

%
% Use < to determine which elements of s1 are less than the corresponding elements of s2 according to ASCII dictionary order.

s1 < s2

% Copyright 2012 The MathWorks, Inc.