Convert to Fixed Point

Propose data types for objects in your model

After collecting idealized simulation ranges, derived ranges or both as described in Collect Ranges, propose data types for objects in your model based on the collected ideal ranges.


fxpoptOptimize data types of a system


DataTypeWorkflow.ConverterCreate fixed-point converter object
DataTypeWorkflow.ProposalSettingsProposal settings object for data type proposals
fxpOptimizationOptionsSpecify options for data type optimization
OptimizationSolutionOptimized fixed-point implementation of system
OptimizationResult Result after optimizing fixed-point system


Convert Using the Fixed-Point Tool

Convert Data Types

Third step in autoscaling workflow.

Rescale a Fixed-Point Model

Use the Fixed-Point Tool to scale fixed-point data types in a feedback model.

How Hardware Implementation Settings Affect Data Type Proposals

This example shows how to use the Fixed-Point Tool to propose word lengths for a model that implements a simple moving average algorithm.

Propose Data Types For Merged Simulation Ranges

Use the Fixed-Point Tool to merge results from multiple simulations, and propose data types based on the merged results.

Convert Floating-Point Model to Fixed Point

Details the steps taken to convert a floating-point model to fixed point.

Fixed-Point Tool

Introduces the Fixed-Point Tool

Choosing a Range Collection Method

There are three methods for collecting ranges on which to base data type proposals.

Before Proposing Data Types for Your Model

Take these actions to prepare your model for fixed-point conversion.

Best Practices for Fixed-Point Workflow

Modeling best practices for converting a model to fixed point.

How the Fixed-Point Tool Proposes Data Types

The Fixed-Point Tool proposes data types based on collected ranges and proposal settings

Get Proposals for Results with Inherited Types

Blocks can inherit data types from a variety of sources. You can get data type proposals for blocks that use inherited output data types using the Fixed-Point Tool.

Autoscaling Using the Fixed-Point Tool

Workflow steps for autoscaling using the Fixed-Point Tool.

Convert to Fixed Point Programmatically

The Command-Line Interface for the Fixed-Point Tool

Highlight the differences between the command-line interface workflow and the Fixed-Point Tool workflow

Convert a Model to Fixed Point Using the Command Line

Use the command line interface of the Fixed-Point Tool to autoscale a model.

Optimize Fixed-Point Data Types for a System

Optimize data types in a system based on specified tolerances

Optimize Data Types Using Multiple Simulation Scenarios

Define multiple simulation scenarios for range collection and verification

Conversion of Model Objects

Propose Data Types for a Referenced Model

How to propose data types for a referenced model.

Autoscaling Data Objects Using the Fixed-Point Tool

Use the Fixed-Point Tool to convert a model that uses data objects for data type specification to fixed point

Convert a System Object to Fixed Point Using the Fixed-Point Tool

Use the Fixed-Point Tool with System objects

Convert MATLAB Function Block to Fixed Point

Use the Fixed-Point Tool to convert a MATLAB® Function block to fixed-point

Replace Functions in a MATLAB Function Block with a Lookup Table

Automatically replace functions in a MATLAB Function Block with a lookup table replacement.


Troubleshooting Data Type Optimization

Investigate errors thrown during data type optimization using the fxpopt function.

Models That Might Cause Data Type Propagation Errors

Overview of modeling practices that could cause data type propagation errors after autoscaling.

Data Type Propagation Errors After Applying Proposed Data Types

Under certain conditions, the Fixed-Point Tool may propose a data type that is not compatible with the model.

Why Did The Fixed-Point Tool Not Propose Data Types?

This section explains what to do when the Fixed-Point Tool does not propose any data types.

Data Type Mismatch and Structure Initial Conditions

This example shows how to replace a structure initial condition with a Simulink.Parameter object.

Featured Examples