dash.assert.integers
Throw error if numeric array does not consist entirely of integers
Syntax
Description
dash.assert.integers(X)
Throws an error if the input is not an array consisting only of integers. Here, “integer” does not refer to the underlying data type of the array, but rather the values of the array elements. An array of type “double” will pass the assertion if all elements are integers. Values of NaN, Inf, and -Inf are not considered integers here.
Customize thrown error message and ID.
Input Arguments
X
numeric array
The numeric array being tested
name
string scalar
The name of the input to use in error messages
header
string scalar
Header for thrown error IDs