isnumeric
Test whether the input is a numeric type.
Syntax
Section titled “Syntax”tf = isnumeric(A)Description
Section titled “Description”Returns true when A’s element type is any numeric type — integer, floating-point, or complex. Returns false for strings, logicals, structs, cells, tables, and other non-numeric containers.
Applied elementwise for non-scalar inputs in script mode; scalar in Excel-compatible mode.
Examples
Section titled “Examples”isnumeric(3.14) % 1isnumeric('hello') % 0isnumeric(true) % 0 (logicals are not numeric)