dash.is.positiveIntegers
Test if a numeric array consists entirely of positive integers
Syntax
Description
Return true if X consists entirely of positive integers. Return false otherwise.
If X is not all positive integers, also return the index of the first element that is not a positive integer.
Input Arguments
X
numeric array
The array being tested
Output Arguments
tf
scalar logical
True if X consists entirely of positive integers. False otherwise
loc
[] | scalar linear index
If X is positive integers, an empty array. Otherwise, the index of the first element that is not a positive integer