dash.is.integers

Test if a numeric array consists of integers


Syntax



Description

tf = dash.is.integers(X)

Returns true if the input consists entirely of integers. Returns false otherwise.

[tf, loc] = dash.is.integers(X)

If the array does not consist entirely of integers, returns the index of the first non-integer element.


Input Arguments

X

numeric array
The numeric array being tested

Output Arguments

tf

scalar logical
True if the array consists entirely of integers. Otherwise false.

loc

[] | scalar linear index
If the array is integers, an empty array. If the array is not all integers, the index of the first non-integer element.