Main Content

isscaledtype

Determine whether input is fixed-point or scaled double data type

Description

example

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

example

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

Examples

collapse all

Create a fi object and determine whether its DataType property is set to Fixed or ScaledDouble.

a = fi([pi,pi/2]);
tf = isscaledtype(a)
tf = logical
   1

Create a numerictype object and determine whether its DataType property is set to Fixed or ScaledDouble.

T1 = numerictype('DataType','ScaledDouble');
tf = isscaledtype(T1)
tf = logical
   1

T2 = numerictype('DataType','Single');
tf = isscaledtype(T2)
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.

Introduced in R2008a