storedInteger
fi
对象的存储整数值
说明
示例
fi
对象的存储整数值
此示例说明如何查找两个 fi
对象的存储整数值。使用 class
函数显示存储整数数据类型。
x = fi([0.2 0.3 0.5 0.3 0.2]); in_x = storedInteger(x); c1 = class(in_x)
c1 = 'int16'
numtp = numerictype('WordLength',17); x_n = fi([0.2 0.3 0.5 0.3 0.2],'numerictype',numtp); in_xn = storedInteger(x_n); c2 = class(in_xn)
c2 = 'int32'
输入参数
a
— 定点数值对象
fi
对象
要从中获取存储整数值的定点数值对象,指定为 fi
对象。
数据类型: fi
复数支持: 是
输出参量
x
— fi
对象的存储整数值
整数
fi
对象的存储整数值,以整数形式返回。
返回的存储整数值是存储整数值 f
适合的最小内置整数数据类型。有符号 fi
值返回 int8
、int16
、int32
或 int64
类型的存储整数。无符号 fi
值返回 uint8
、uint16
、uint32
或 uint64
类型的存储整数。根据存储整数字长 (WL) 确定返回类型:
WL ≤ 8 位,返回类型为
int8
或uint8
。8 位 < WL ≤ 16 位,返回类型为
int16
或uint16
。16 位 < WL ≤ 32 位,返回类型为
int32
或uint32
。32 位 < WL ≤ 64 位,返回类型为
int64
或uint64
。
扩展功能
C/C++ 代码生成
使用 MATLAB® Coder™ 生成 C 代码和 C++ 代码。
版本历史记录
在 R2012a 中推出
MATLAB 命令
您点击的链接对应于以下 MATLAB 命令:
请在 MATLAB 命令行窗口中直接输入以执行命令。Web 浏览器不支持 MATLAB 命令。
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)