查找表优化
创建、优化和压缩函数查找表
使用查找表可以为定点嵌入式设备高效实现计算密集型函数。例如,您可以使用查找表高效地实现对数、正弦和平方根计算。使用查找表优化器,您可以生成用于逼近函数、子系统和模块的节省内存的查找表。您也可以使用它来优化现有查找表以减少内存使用量。
App
| 查找表优化器 | Optimize existing lookup table or approximate function with lookup table |
类
FunctionApproximation.Problem | Object defining the function to approximate, or the lookup table to optimize |
FunctionApproximation.Options | Specify additional options to use with
FunctionApproximation.Problem object |
FunctionApproximation.LUTSolution | Optimized lookup table data or lookup table data approximating a math function |
FunctionApproximation.LUTMemoryUsageCalculator | Calculate memory used by lookup table blocks in a system |
FunctionApproximation.TransformFunction | Object defining transform function to approximate (自 R2023a 起) |
对象
LUTCompressionResult | Optimized lookup table data for all Lookup Table blocks in a system |
函数
主题
查找表优化器工作流
- Optimize Lookup Tables for Memory-Efficiency
Optimize Lookup Tables using the Lookup Table Optimizer. - Generate an Optimized Lookup Table as a MATLAB Function
Use the Lookup Table Optimizer to generate a lookup table as a MATLAB® function.
查找表优化器命令行工作流
- Optimize Lookup Tables for Memory-Efficiency Programmatically
Optimize an existing lookup table, generate a lookup table from a Math Function block or function handle. - Fixed-Point Function Approximation
When a fixed-point library function is not available, fixed-point applications require an approximation of the function. - Approximate Functions with a Direct Lookup Table
Generate direct lookup table approximations of functions or blocks. - Replace Fitted Curve with Optimized Lookup Table
Reduce the size of lookup tables for functions with symmetry. - Generate an Optimized Lookup Table as a MATLAB Function Programmatically
Programmatically generate an optimized lookup table as a MATLAB function. - Optimize Lookup Tables for Periodic Functions
Reduce the size of lookup tables for functions with symmetry.
Simulink 中的预查找和插值
- Fixed-Point Prelookup and Interpolation
This example demonstrates some of the features of Prelookup and Interpolation Using Prelookup blocks. - 在 Prelookup 和 Interpolation 模块中共享参数
此示例说明 Prelookup 和 Interpolation 模块如何在生成代码中共享其参数数据。 - Interpolation 模块中的高精度计算
此示例说明如何使用内部规则在 Interpolation Using Prelookup 模块中执行高精度计算。Interpolation 模块允许设置中间结果的数据类型。 - Prelookup 模块的共享工具函数
此示例说明 Prelookup 模块如何共享工具函数。Prelookup 模块生成的工具函数由模块的输入、输出和断点参数的目标数据类型以及索引搜索方法和整数舍入模式确定。即使两个 Prelookup 模块具有不同输入数据类型、输出数据类型和断点数据类型,它们也会使用共享工具函数。
在 MATLAB 中实现查找表
- Normalize Data for Lookup Tables
This example shows how to normalize data for use in lookup tables. - 使用查找表实现定点 Log2
此示例说明如何使用查找表实现定点 log2。查找表可为嵌入式设备生成高效代码。 - 使用查找表实现定点平方根
此示例说明如何使用查找表实现定点平方根。




