isinteger
Determine if input is integer array
Syntax
tf = isinteger(A)
Description
tf = isinteger(A)
returnstrue
如果数组A
is an integer type andfalse
otherwise.
An integer array is any of the following integer types and any subclasses of those types:
Examples
These examples show the valuesisinteger
returns when passed specific types:
% uint8 is one of the integer typesisinteger(uint8(1:255)) ans = 1% pi returns a double-precision valueisinteger(pi) ans = 0% Constants are double-precision by defaultisinteger(3) ans = 0% isinteger returns a logical valueisinteger(isinteger(uint8(3))) ans = 0
Extended Capabilities
Introduced before R2006a
Was this topic helpful?