Main Content

issingle

Determine whether input is single-precision data type

Description

example

tf = issingle (a)returns1(true) when theDataTypeproperty offiobjectaissingle. Otherwise, it returns0(false).

example

tf = issingle (T)returns1(true) when theDataTypeproperty ofnumerictypeobjectTissingle. Otherwise, it returns0(false).

Examples

collapse all

创建一个fiobject 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 =logical0

创建一个numerictypeobject and determine whether it is single-precision data type.

T = numerictype('Single')
T = DataTypeMode: Single
tf = issingle (T)
tf =logical1

Input Arguments

collapse all

Inputfiobject, specified as a scalar, vector, matrix, or multidimensional array.

Data Types:fi

Inputnumerictypeobject, specified as a scalar.

Version History

Introduced in R2008a