Main Content

issingle

Determine whether input is single-precision data type

Description

example

tf = issingle(a) returns 1 (true) when the DataType property of fi object a is single. Otherwise, it returns 0 (false).

example

tf = issingle(T) returns 1 (true) when the DataType property of numerictype object T is single. Otherwise, it returns 0 (false).

Examples

collapse all

Create a fi object and determine whether it is single-precision data type.

a = fi(pi)
a = 
    3.1416

          DataTypeMode: Fixed-point: binary point scaling
            Signedness: Signed
            WordLength: 16
        FractionLength: 13
tf = issingle(a)
tf = logical
   0

Create a numerictype object and determine whether it is single-precision data type.

T = numerictype('Single')
T =


          DataTypeMode: Single
tf = issingle(T)
tf = logical
   1

Input Arguments

collapse all

Input fi object, specified as a scalar, vector, matrix, or multidimensional array.

Data Types: fi

Input numerictype object, specified as a scalar.

Version History

Introduced in R2008a