Determine whether input is integer array
returns
logical TF = isinteger(A)1 (true) if A is an array
of integer type. Otherwise, it returns logical 0
(false).
Integer types in MATLAB® include: int8, int16,
int32, int64, uint8,
uint16, uint32, and uint64. For
more information, see Integer Classes.
For a floating-point number of a single or
double type, you can check if it is also an integer by using the
round function (within the floating-point
relative accuracy eps). If the rounded value of the number is
equal to the original value before rounding, then the number is an integer. For example,
2 == round(2) returns logical 1
(true) since 2 is an integer.