Specify Type Proposal Options
To view type proposal options, in the MATLAB® Coder™ app, on the Convert to Fixed Point page, click the Settings arrow .
The following options are available.
Basic Type Proposal Settings | Values | Description |
---|---|---|
Fixed-point type proposal mode |
Propose fraction lengths for specified word length |
Use the specified word length for data type proposals and propose the minimum fraction lengths to avoid overflows. |
Propose word lengths for specified fraction length (default) |
Use the specified fraction length for data type proposals and propose the minimum word lengths to avoid overflows. | |
Default word length |
16 (default) |
Default word length to use when Fixed-point type
proposal mode is set to |
Default fraction length |
4 (default) |
Default fraction length to use when Fixed-point type
proposal mode is set to |
Advanced Type Proposal Settings | Values | Description | |
---|---|---|---|
When proposing types Note Manually-entered static ranges always take precedence over simulation ranges. |
ignore simulation ranges |
Propose data types based on derived ranges. | |
ignore derived ranges |
Propose data types based on simulation ranges. | ||
use all collected data (default) |
Propose data types based on both simulation and derived ranges. | ||
Propose target container types |
Yes |
Propose data type with the smallest word length that can represent
the range and is suitable for C code generation ( 8,16,32, 64 … ).
For example, for a variable with range | |
No (default) |
Propose data types with the minimum word length needed to represent the value. | ||
Optimize whole numbers |
No |
Do not use integer scaling for variables that were whole numbers during simulation. | |
Yes (default) |
Use integer scaling for variables that were whole numbers during simulation. | ||
Signedness |
Automatic (default) |
Proposes signed and unsigned data types depending on the range information for each variable. | |
Signed |
Propose signed data types. | ||
Unsigned |
Propose unsigned data types. | ||
Safety margin for sim min/max (%) |
0 (default) |
Specify safety factor for simulation minimum and maximum values. The simulation minimum and maximum values are adjusted by the
percentage designated by this parameter, allowing you to specify a
range different from that obtained from the simulation run. For
example, a value of | |
Search paths |
|
Add paths to the list of paths to search for MATLAB files. Separate list items with a semicolon. |
fimath Settings | Values | Description |
---|---|---|
Rounding method |
Ceiling |
Specify the The default fixed-point math properties use the
After code generation, if required, modify these settings to optimize the generated code, or example, avoid overflow or eliminate bias, and then rerun the verification. For more information on |
Convergent | ||
Floor (default) | ||
Nearest | ||
Round | ||
Zero | ||
Overflow action |
Saturate | |
Wrap (default) | ||
Product mode |
FullPrecision (default) | |
KeepLSB | ||
KeepMSB | ||
SpecifyPrecision | ||
Sum mode |
FullPrecision (default) | |
KeepLSB | ||
KeepMSB | ||
SpecifyPrecision |
Generated File Settings | Value | Description |
---|---|---|
Generated fixed-point file name suffix |
_fixpt (default) |
Specify the suffix to add to the generated fixed-point file names.
For example, by default, if you
generate a static library for a project named
|
Plotting and Reporting Settings | Values | Description |
---|---|---|
Custom plot function |
|
Specify the name of a custom plot function to use for comparison plots. |
Plot with Simulation Data Inspector |
No (default) |
Specify whether to use the Simulation Data Inspector for comparison plots. |
Yes | ||
Highlight potential data type issues |
No (default) |
Specify whether to highlight potential data types in the generated html report. If this option is turned on, the report highlights single-precision, double-precision, and expensive fixed-point operation usage in your MATLAB code. |
Yes |