%% 2-D Array of Strings
% Create a 2-D array of strings and determine if each column is sorted.

str = string({'Horse','Chicken';'cow','Goat'})

%

issorted(str)

%
% Determine if the rows are sorted from left to right.

issorted(str,2)

%
% Determine if each row is sorted in descending order from left to right.

issorted(str,2,'descend')

% Copyright 2012 The MathWorks, Inc.