%% List Categories in Categorical Array
% Create a categorical array, A.

A = categorical({'plane' 'car' 'train' 'car' 'plane'})

% A is a 1-by-5 categorical array.
%
% Display the categories of A.

C = categories(A)

% Since you created A by specifying only an input array, the categories appear in alphabetical order.
% Copyright 2012 The MathWorks, Inc.