# Create Fixed-Point Objects in MATLAB

`fi` and `numerictype` for fixed-point data creation

You can create fixed-point data using the Fixed-Point Designer™ `fi` object. Within the `fi` constructor, you can specify `numerictype` and `fimath` properties. Each `fi` object has an associated `numerictype` object. The `numerictype` object stores information about the `fi` object including word length, fraction length, and signedness. The `numerictype` object is equivalent to the `fixdt` object in Simulink®.

## Functions

expand all

 `fi` Construct fixed-point numeric object
 `fimath` Set fixed-point math settings `fixed.fimathLike` Return `fimath` object like the input (Since R2022b) `globalfimath` Configure global fimath and return handle object `removefimath` Remove `fimath` from `fi` object `removeglobalfimathpref` Remove global fimath preference `resetglobalfimath` Set global fimath to MATLAB factory default `setfimath` Attach `fimath` object to `fi` object
 `fipref` Set fixed-point preferences `savefipref` Save `fi` preferences for next MATLAB session `isfipref` Determine whether input is `fipref` object
 `lowerbound` Lower bound of range of `fi` object `lsb` Scaling of least significant bit of `fi` object, or value of least significant bit of `quantizer` object `range` Numerical range of `fi` or `quantizer` object `upperbound` Upper bound of range of `fi` object `sort` Sort elements of real-valued `fi` object in ascending or descending order
 `fixed.aggregateType` Compute aggregate numerictype `get` Property values of object `isequal` Determine whether real-world values of two `fi` objects are equal, or determine whether properties of two `fimath`, `numerictype`, or `quantizer` objects are equal `isequaln` Determine equality of fixed-point arrays, treating NaN values as equal (Since R2021a) `reset` Reset objects to initial conditions `set` Set or display property values for `quantizer` objects `mat2str` Convert matrix to string `tostring` Convert `fi`, `fimath`, `numerictype`, or `quantizer` object to string

## Classes

 `numerictype` Construct an `embedded.numerictype` object describing fixed-point or floating-point data type

## Troubleshooting

Resolve Error: Mismatched fimath

Troubleshoot mismatched `fimath` errors.

Resolve Error: Data Type Mismatch

Troubleshoot data type mismatch errors.

Resolve Error: fi*non-fi

Troubleshoot `fi*`non-`fi` errors.

fi Constructor Does Not Follow globalfimath Rules

Troubleshoot getting the `fi` constructor to follow `globalfimath` rules.