Use the FixPt To FixPt Inherited block. Because Simulink® propagates data types throughout a block diagram, fixed-point utility modeling can be templatized for multiple use scenarios.
Optimize fixed-point operations in generated code using minimum and maximum values that you specify in a model.
This model shows how sample implementations of filtered and unfiltered fixed-point derivative algorithms compare with their floating-point implementations.
Perform high precision calculations in the Interpolation Using Prelookup block using internal rules. The Interpolation block allows the data type for intermediate results to be set.
A comparison between various fixed-point integrator realizations and an equivalent floating point realization.
Control generation of multiword operations in generated code.
This model shows how to convert signals between built-in and fixed-point data types and illustrates how fixed-point data types affect the representable precision and range. The
Control the generation of multiplication helper functions in the generated code.
How Prelookup blocks share utility functions. The utility functions generated by the Prelookup block are determined by the target data type of the block's inputs, outputs, and breakpoint
Convert from one fixed-point data type to another fixed-point data type. In this case the conversion is between sfix32_En2 and ufix8_En1, meaning:
Some of the features of Prelookup and Interpolation Using Prelookup blocks.
This model shows sample implementations of fixed-point state space realizations with a comparison to floating-point implementations.