Parameter variables can be declared as Fix or FixArray.
The precision of fixed-point parameters is specified by an associated precision parameter using either one of two possible syntaxes:
- By specifying just a value itself in the dialog box. This creates a fixed-point number with the default length of 24 bits and with the position of the binary point set as required to store the integer value. For example, the value 1.0 creates a fixed-point object with precision 2.22, and the value 0.5 would create one with precision 1.23.
- By specifying a (value, precision) pair. This creates a fixed-point number with the specified precision. For example, the value (2.546, 3.5) creates a fixed-point object by casting the double 2.546 to a Fix with precision 3.5.