Main Content

iscategorical

Determine if input is categorical array

Description

tf = iscategorical(A) returns logical 1 (true) if the input is a categorical array. Otherwise, iscategorical returns logical 0 (false).

example

Examples

collapse all

Create an array.

A = categorical(["red" "green" "violet"; "orange" "red" "yellow"])
A = 2x3 categorical
     red         green      violet 
     orange      red        yellow 

Determine if the array is a categorical array.

tf = iscategorical(A)
tf = logical
   1

Input Arguments

collapse all

Input array.

Extended Capabilities

Thread-Based Environment
Run code in the background using MATLAB® backgroundPool or accelerate code with Parallel Computing Toolbox™ ThreadPool.

Version History

Introduced in R2013b