Main Content

isfixed

Determine whether input is fixed-point data type

Description

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

example

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

example

tf = isfixed(q) returns 1 when q is a fixed-point quantizer object. Otherwise, it returns 0 (false).

example

Examples

collapse all

Create a fi object and determine whether it is a fixed-point data type.

a = fi([pi pi/2])
a = 
    3.1416    1.5708

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

Create a numerictype object and determine whether it is a fixed-point data type.

T = numerictype('Double')
T =


          DataTypeMode: Double
tf = isfixed(T)
tf = logical
   0

Create a quantizer object and determine whether it is a fixed-point data type.

q = quantizer('mode','single')
q =


        DataMode = single
          Format = [32  8]
tf = isfixed(q)
tf = logical
   0

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.

Input quantizer object, specified as a scalar.

Version History

Introduced in R2008a