Documentation

isinteger

Determine if input is integer array

Syntax

tf = isinteger(A)

Description

tf = isinteger(A)returnstrue如果数组Ais an integer type andfalseotherwise.

An integer array is any of the following integer types and any subclasses of those types:

MATLAB Integer Types

Examples

These examples show the valuesisintegerreturns 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

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

See Also

||

Introduced before R2006a

Was this topic helpful?