MATLAB 帮助中心
确定 fi 对象是否为有符号对象
fi
tf = issigned(a)
如果 fi 对象 a 为有符号,则 tf = issigned(a) 返回 1 (true)。否则,返回 0 (false)。
a
1
true
0
false
示例
全部折叠
创建一个 fi 对象,并确定它是有符号还是无符号。
a1 = fi(pi,1)
a1 = 3.1416 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 13
tf = issigned(a1)
tf = logical 1
a2 = fi(pi,0)
a2 = 3.1416 DataTypeMode: Fixed-point: binary point scaling Signedness: Unsigned WordLength: 16 FractionLength: 14
tf = issigned(a2)
tf = logical 0
如果具有 Auto Signedness 的 numerictype 对象用于创建 fi 对象,则 fi 对象的 Signedness 属性自动默认为 Signed。
Auto Signedness
numerictype
Signedness
Signed
T = numerictype('Signedness','Auto')
T = DataTypeMode: Fixed-point: binary point scaling Signedness: Auto WordLength: 16 FractionLength: 15
a3 = fi(pi,T)
a3 = 1.0000 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 16 FractionLength: 15
tf = issigned(a3)
输入 fi 对象,指定为标量、向量、矩阵或多维数组。
数据类型: fi
全部展开
在 R2006a 之前推出
isfi | isfixed | isscaleddouble | isscaledtype | isscalingbinarypoint | isscalingslopebias | isscalingunspecified
isfi
isfixed
isscaleddouble
isscaledtype
isscalingbinarypoint
isscalingslopebias
isscalingunspecified
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
选择网站
选择网站以获取翻译的可用内容,以及查看当地活动和优惠。根据您的位置,我们建议您选择:。
您也可以从以下列表中选择网站:
如何获得最佳网站性能
选择中国网站(中文或英文)以获得最佳网站性能。其他 MathWorks 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处