isnumeric
Tests if a value is numeric.
Syntax
R = isnumeric(A)
Inputs
- A
- The input to be tested for numeric values.
Outputs
- R
- R is a logical value indicating whether A is numeric. Real and complex scalars are considered numeric. Strings and logicals are not considered numeric.
Examples
Matrix example:
R = isnumeric([1, inf, 2/0])
R = 1
String
example:
R = isnumeric('hello')
R = 0
Logical
example:
R = isnumeric(true)
R = 0