主要内容

isscaledtype

确定输入是定点还是定标双精度数据类型

说明

tf = isscaledtype(a)fi 对象 aDataType 属性为 FixedScaledDouble 时返回 1 (true)。否则,返回 0 (false)。

示例

tf = isscaledtype(T)numerictype 对象 TDataType 属性为 FixedScaledDouble 时返回 1 (true)。否则,返回 0 (false)。

示例

示例

全部折叠

创建一个 fi 对象并确定其 DataType 属性是设置为 Fixed 还是 ScaledDouble

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

创建一个 numerictype 对象并确定其 DataType 属性是设置为 Fixed 还是 ScaledDouble

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

T2 = numerictype('DataType','Single');
tf = isscaledtype(T2)
tf = logical
   0

输入参数

全部折叠

输入 fi 对象,指定为标量、向量、矩阵或多维数组。

数据类型: fi

输入 numerictype 对象,指定为标量。

版本历史记录

在 R2008a 中推出