MATLAB Programming Fundamentals - MathWorks

(やまだぃちぅ) #1

Core Functions Supporting Categorical Arrays


Many functions in MATLAB operate on categorical arrays in much the same way that they
operate on other arrays. A few of these functions might exhibit special behavior when
operating on a categorical array. If multiple input arguments are ordinal categorical
arrays, the function often requires that they have the same set of categories, including
order. Furthermore, a few functions, such as max and gt, require that the input
categorical arrays are ordinal.

The following table lists notable MATLAB functions that operate on categorical arrays in
addition to other arrays.

size
length
ndims
numel

isrow
iscolumn

cat
horzcat
vertcat

isequal
isequaln

eq
ne
lt
le
ge
gt

min
max
median
mode

intersect
ismember
setdiff
setxor
unique
union

times

sort
sortrows
issorted

permute
reshape
transpose
ctranspose

plot
plot3
scatter
scatter3
bar
barh
histogram

pie
rose
stem
stairs
area
mesh
surf
surface

semilogx
semilogy
fill
fill3
line
text

double
single
int8
int16
int32
int64
uint8
uint16
uint32
uint64
char
string
cellstr

8 Categorical Arrays

Free download pdf