isfloat - Determine if input is floating-point array - MATLAB (original) (raw)
Main Content
Determine if input is floating-point array
Syntax
Description
`tf` = isfloat([A](#mw%5F46d22559-c5c1-45fc-81bf-f541e2d5eefd))
returnstrue
if A
is a floating-point array andfalse
otherwise. The floating-point types are single and double.
Examples
These examples show the values isfloat
returns when passed specific types:
% pi returns a floating-point value isfloat(pi)
% Complex numbers are floating-point values isfloat(3+7i)
% Single-precision numbers are floating-point values isfloat(realmax('single'))
% isfloat returns a logical value isfloat(isfloat(pi))
Input Arguments
Input array, specified as a scalar, vector, matrix, or multidimensional array. Floating-point types in MATLABĀ® include single
and double
(and subclasses of single
and double
).
Extended Capabilities
The isfloat
function fully supports GPU arrays. To run the function on a GPU, specify the input data as a gpuArray (Parallel Computing Toolbox). For more information, see Run MATLAB Functions on a GPU (Parallel Computing Toolbox).
Version History
Introduced before R2006a