Provides an example based on the
which highlights many of the key features of the Fixed-Point
How to avoid precision loss by overriding the data types in your model with scaled doubles.
The port display for fixed-point signals consists of three parts: the data type, the number of bits, and the scaling.
Describes how fixed-point numbers are represented in Simulink®.
Discusses the representation and manipulation of floating-point numbers
Data types supported for simulation and code generation
The dynamic range of fixed-point numbers is much less than floating-point numbers with equivalent word sizes. To avoid overflow conditions and minimize quantization errors, fixed-point numbers must be scaled.
The quantization of a real-world value is represented by a weighted sum of bits.
The range of a number gives the limits of the representation, while the precision gives the distance between successive numbers in the representation. The range and precision of a fixed-point number depend on the length of the word and the scaling.
Scaled doubles are a hybrid between floating-point and fixed-point numbers. The Fixed-Point Designer software stores them as doubles with the scaling, sign, and word length information retained.