Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

isinteger

Determine if input is integer array

Syntax

tf = isinteger(A)

Description

tf = isinteger(A) returns true if the array A is an integer type and false otherwise.

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

 MATLAB Integer Types

Examples

These examples show the values isinteger returns when passed specific types:

% uint8 is one of the integer types
isinteger(uint8(1:255))
ans =
     1
% pi returns a double-precision value
isinteger(pi)
ans =
     0
% Constants are double-precision by default
isinteger(3)
ans =
     0
% isinteger returns a logical value
isinteger(isinteger(uint8(3)))
ans =
     0

See Also

| |

Introduced before R2006a

Was this topic helpful?