The nominal and ordinal array data types might be removed in a future release. To represent ordered and unordered discrete, nonnumeric data, use the MATLAB® categorical data type instead.
C = horzcat(dim,A,B,...)
C = horzcat(A,B)
C = horzcat(dim,A,B,...) horizontally concatenates the categorical arrays A,B,... . For matrices, all inputs must have the same number of rows. For n-D arrays, all inputs must have the same sizes except in the second dimension. The set of categorical levels for C is the sorted union of the sets of levels of the inputs, as determined by their labels.
C = horzcat(A,B) is called for the syntax [A B].