Documentation

This is machine translation

Translated by Microsoft
Mouse over text to see original. Click the button below to return to the English verison of the 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?