isundefined
Marks elements of a categorical array that have no category.
Category: Language Fundamentals > Data Types
Syntax
tf = isundefined(C)
Returns a logical array that is true where the element of C is undefined.
Description
An element is undefined when it was created from empty text, from a value not in the list of categories, or from missing. It displays as <undefined> and is not counted by countcats. isundefined(C) is the categorical form of ismissing.
Input arguments
C- A categorical array.
Output arguments
tf- Logical array the same size as
C.
Example
Spotting undefined values
c = categorical({'a', 'b', ''})
isundefined(c)
Output
c = 1×3 categorical array
a b <undefined>
ans = 1×3 logical array
0 0 1