Main Content

isdouble

Determine whether input is double-precision data type

Description

example

tf = isdouble(a)returns1(true) when theDataTypeproperty offiobjectais double. Otherwise, it returns0(false).

example

tf = isdouble(T)returns1(true) when theDataTypeproperty ofnumerictypeobjectTisdouble. Otherwise, it returns0(false).

Examples

collapse all

创建一个fiobject and determine if its data type isdouble.

a = fi(pi)
a = 3.1416 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 13
tf = isdouble(a)
tf =logical0
a = fi(pi,'DataType','double')
a = 3.1416 DataTypeMode: Double
tf = isdouble(a)
tf =logical1

创建一个numerictypeobject and determine if its data type isdouble.

T = numerictype
T = DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 15
tf = isdouble(T)
tf =logical0
T = numerictype('Double')
T = DataTypeMode: Double
tf = isdouble(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.

Introduced in R2008a