Main Content

Best Practices for Working with the MATLAB Function Block in Automated Fixed-Point Conversion Workflows

Follow these best practices when using MATLAB® Function blocks with automated fixed-point conversion workflows, including the Fixed-Point Tool and fxpopt.

  • Do not edit the fixed-point variant of your MATLAB Function block algorithm. Use the code view to edit the floating-point variant of your MATLAB code and reconvert to fixed-point data types.

  • For a successful conversion, only use modeling constructs supported for automated fixed-point conversion. For a list of the supported modeling constructs, see MATLAB Language Features Supported for Automated Fixed-Point Conversion.

  • While collecting range information, do not edit the MATLAB code in the MATLAB Function block. Editing the code will cause problems if you try to merge results.

  • During the fixed-point conversion process using the Fixed-Point Tool, do not use the "Save As" option to save the MATLAB Function block with a different name. If you do, you might lose existing results for the original block.

Unsupported MATLAB Function Block Features

These MATLAB Function block features are not supported for automated fixed-point conversion workflows.

See Also

Related Topics