MATLAB Function Reference | ![]() ![]() |
Determine if item is a numeric array
Syntax
Description
tf = isnumeric(A)
returns logical true (1
) if A
is a numeric array and logical false (0
) otherwise. For example, sparse arrays, and double-precision arrays are numeric while strings, cell arrays, and structure arrays are not.
Examples
Given the following cell array,
C{1,1} = pi; C{1,2} = 'John Doe'; C{1,3} = 2 + 4i; C{1,4} = ispc; C{1,5} = magic(3) C = [3.1416] 'John Doe' [2.0000+ 4.0000i] [1] [3x3 double]
isnumeric
shows that all but C{1,2}
are numeric arrays.
See Also
isnan
, isreal
, isprime
, isfinite
, isinf
, isa
, is*
![]() | isnan | isobject | ![]() |