Fixed-Point Data

Efficient approximations for non-floating-point values

Fixed-point numbers use an integer-based encoding scheme to approximate real numbers. They provide an efficient alternative for numeric computation that does not require floating-point support in underlying system hardware. Minimize the loss of precision in computations by adjusting the encoding scheme.

Topics

Fixed-Point Data in Stateflow Charts

Define fixed-point data in Stateflow® charts.

Fixed-Point Operations in Stateflow Charts

Use integer arithmetic to approximate real numbers.

Supported Operations for Fixed-Point Data

Perform mathematical computations on fixed-point operands.

Handle Integer Overflow for Chart Data

Choose saturation or wrapping behavior for arithmetic overflows.

Model a Bang-Bang Controller by Using Fixed-Point Inputs

Perform limited floating-point operations on an 8-bit processor.

Build a Low-Pass Filter by Using Fixed-Point Data

Model a low-pass Butterworth filter that uses fixed-point arithmetic.

Featured Examples