Replacing Functions Using Lookup Table Approximations
The Fixed-Point Designer™ software provides an option to generate lookup table approximations for continuous and stateless single-input, single-output functions in your original MATLAB® code. These functions must be on the MATLAB path.
You can use this capability to handle functions that are not supported for fixed point and to replace your own custom functions. The fixed-point conversion process infers the ranges for the function and then uses an interpolated lookup table to replace the function. You can control the interpolation method and number of points in the lookup table. By adjusting these settings, you can tune the behavior of replacement function to match the behavior of the original function as closely as possible.
The fixed-point conversion process generates one lookup table approximation per call site of the function that needs replacement.