MATLAB 帮助中心
fi 对象的存储整数的八进制表示
fi
b = oct(a)
b = oct(a) 以八进制格式返回 fi 对象 a 的存储整数作为字符向量。
b
a
定点数可以表示为
real-world value=2−fraction length×stored integer
或者,等效于
real-world value=(slope×stored integer)+bias
此存储整数是原始二进制数字,其中假定二进制小数点位于字的最右侧。
提示
oct 返回 fi 对象的存储整数的八进制表示。要获取 fi 对象的真实值的 n 进制表示,请使用 dec2base。
oct
dec2base
示例
全部折叠
创建一个有符号 fi 对象,值为 -1 和 1,字长为 8 位,小数长度为 7 位。
-1
1
a = fi([-1 1], 1, 8, 7)
a = -1.0000 0.9922 DataTypeMode: Fixed-point: binary point scaling Signedness: Signed WordLength: 8 FractionLength: 7
查找 fi 对象 a 的存储整数的八进制表示。
b = '200 177'
输入数组,指定为 fi 对象。
数据类型: fi
在 R2006a 之前推出
bin | dec | hex | storedInteger | dec2hex | dec2base | dec2bin
bin
dec
hex
storedInteger
dec2hex
dec2bin
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 国家/地区网站并未针对您所在位置的访问进行优化。
美洲
欧洲
亚太
联系您当地的办事处