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.

isfloat

Determine if input is floating-point array

Syntax

tf = isfloat(A)

Description

tf = isfloat(A) returns true if A is a floating-point array and false otherwise. The floating-point types are single and double, and subclasses of single and double.

Examples

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

% pi returns a floating-point value
isfloat(pi)
ans =
     1
% Complex numbers are floating-point values
isfloat(3+7i)
ans =
     1
% Single-precision numbers are floating-point values
isfloat(realmax('single'))
ans =
     1
% isfloat returns a logical value
isfloat(isfloat(pi))
ans =
     0

Introduced before R2006a

Was this topic helpful?