在 MATLAB 中实现查找表
用查找表替换计算密集型函数
使用查找表可以为定点嵌入式设备高效实现计算密集型函数。例如,您可以使用查找表高效地实现对数、正弦、余弦、正切和平方根计算。
函数
fixed.interp1 | 1-D data interpolation (table lookup) (自 R2024a 起) |
fixed.interp2 | Interpolation for 2-D gridded data in meshgrid
format (自 R2024a 起) |
fixed.interp3 | Interpolation for 3-D gridded data in meshgrid
format (自 R2024a 起) |
fixed.interpn | Interpolation for 1-D, 2-D, 3-D, and N-D gridded data in
ndgrid format (自 R2024a 起) |
主题
- Replace the exp Function with a Lookup Table
Replace a function with a lookup table approximation in fixed-point code generated with the
fiaccel
function. - Replace a Custom Function with a Lookup Table
Replace a custom function with a lookup table approximation function by using the
fiaccel
function.