Determine whether input is single-precision data type
tf = issingle(a)
tf = issingle(T)
example
tf = issingle(a) returns 1 (true) when the DataType property of fi object a is single. Otherwise, it returns 0 (false).
a
1
true
DataType
fi
single
0
false
tf = issingle(T) returns 1 (true) when the DataType property of numerictype object T is single. Otherwise, it returns 0 (false).
T
numerictype
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 = logical 0
Create a numerictype object and determine whether it is single-precision data type.
T = numerictype('Single')
T = DataTypeMode: Single
tf = logical 1
Input fi object, specified as a scalar, vector, matrix, or multidimensional array.
Data Types: fi
Input numerictype object, specified as a scalar.
isboolean | isdouble | isfixed | isfloat | isscaleddouble | isscaledtype | isscalingbinarypoint | isscalingslopebias | isscalingunspecified
isboolean
isdouble
isfixed
isfloat
isscaleddouble
isscaledtype
isscalingbinarypoint
isscalingslopebias
isscalingunspecified
You have a modified version of this example. Do you want to open this example with your edits?