tf = iscategory(A, names)
| Parameter | Description |
|---|---|
| A | Input categorical array. |
| names | Category name, string array, cell array of character vectors, or pattern to test. |
| Parameter | Description |
|---|---|
| tf | Logical result with the same size as names, except for pattern input where a scalar result is returned. |
iscategory tests whether requested names are present in the category list of A.
Undefined elements do not create a category and are not matched by this function.
A = categorical({'red','blue'}); tf = iscategory(A, {'red','green'})
| Version | Description |
|---|---|
| 2.0.0 | initial version |