Main Content
isa
Determine if input is instance of specified class
Description
tf = isa(
returns A
,numericCategory
)1
(true
) if the data type of
A
belongs to the category specified by
numericCategory
. Otherwise, it returns 0
(false
).
If A
is an object, then isa
returns
1
if the class of A
, or any superclass of
A
, belongs to the specified category.
Examples
Input Arguments
Tips
To test whether the input array is sparse, use the
issparse
function.To test whether the input array has any imaginary or complex elements, use
~isreal(A)
.
Extended Capabilities
Version History
Introduced before R2006a