%% Summary of Categorical Vector
% Create a 1-by-5 categorical vector.

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

% A has three categories, car, plane, and train.
%
% Print a summary of A.

summary(A)

% car appears in two elements of A, plane appears in two elements, and train appears in one element.
% Since A is a row vector, summary lists the occurrences of each category horizontally.
% Copyright 2012 The MathWorks, Inc.