The nominal and ordinal array data types are not
recommended. To represent ordered and unordered discrete, nonnumeric data, use the Categorical Arrays
data type instead.
B = mergelevels(A,oldlevels)
merges two or more levels of A.
If A is a nominal array,
mergelevels uses the first label in
oldlevels as the new level.
If A is an ordinal array, the levels
specified by oldlevels must be consecutive, and
mergelevels uses the label corresponding to the
lowest level in oldlevels as the label for the new
level.
A — Nominal or ordinal array nominal array | ordinal array
Nominal or ordinal array, specified as a nominal or ordinal array object
created with nominal or
ordinal.
oldlevels — Levels to merge string array | cell array of character vectors | 2-D character array
Levels to merge, specified as a string array, cell array of character
vectors, or 2-D character array. For ordinal arrays, the levels in
oldlevels must be consecutive.
Data Types: char | string | cell
newlevel — Level to create character vector | string scalar
Level to create from the merged levels, specified as a character vector or
string scalar that gives the label for the new level.
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.