%% Determine Whether Workspace Variable Is Categorical Array
% Create a workspace variable, A.

A = categorical({'red' 'green' 'violet'; 'orange' 'red' 'yellow'})

%
% Verify that the workspace variable, A, is a categorical array.

tf = iscategorical(A)

% A is a 2-by-3 categorical array.
% Copyright 2012 The MathWorks, Inc.