Determine if input has specified data type
tf = isa(
returns A
,typeCategory
)1
(true
) if the data type of
A
belongs to the category specified by typeCategory
.
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.
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)
.