主要内容

查找表优化

创建、优化和压缩函数查找表

使用查找表可以为定点嵌入式设备高效实现计算密集型函数。例如,您可以使用查找表高效地实现对数、正弦和平方根计算。使用查找表优化器,您可以生成用于逼近函数、子系统和模块的节省内存的查找表。您也可以使用它来优化现有查找表以减少内存使用量。

App

查找表优化器Optimize existing lookup table or approximate function with lookup table

FunctionApproximation.ProblemObject defining the function to approximate, or the lookup table to optimize
FunctionApproximation.Options Specify additional options to use with FunctionApproximation.Problem object
FunctionApproximation.LUTSolutionOptimized lookup table data or lookup table data approximating a math function
FunctionApproximation.LUTMemoryUsageCalculatorCalculate memory used by lookup table blocks in a system
FunctionApproximation.TransformFunctionObject defining transform function to approximate (自 R2023a 起)

对象

LUTCompressionResultOptimized lookup table data for all Lookup Table blocks in a system

函数

全部展开

FunctionApproximation.compressLookupTablesCompress all Lookup Table blocks in a system
fixed.interp11-D data interpolation (table lookup) (自 R2024a 起)
fixed.interp2Interpolation for 2-D gridded data in meshgrid format (自 R2024a 起)
fixed.interp3Interpolation for 3-D gridded data in meshgrid format (自 R2024a 起)
fixed.interpnInterpolation for 1-D, 2-D, 3-D, and N-D gridded data in ndgrid format (自 R2024a 起)

主题

查找表优化器工作流

查找表优化器命令行工作流

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 中实现查找表

精选示例