MATLABLanguage Features Supported for Automated Fixed-Point Conversion
MATLAB Language Features Supported for Automated Fixed-Point Conversion
Fixed-Point Designer™ supports the following MATLAB®language features in automated fixed-point conversion:
n维数组
Matrix operations, including deletion of rows and columns
Variable-sized data (seeGenerate Code for Variable-Size Data). Range computation for variable–sized data is supported via simulation mode only. Variable-sized data is not supported for comparison plotting.
Subscripting (seeIncompatibility with MATLAB in Matrix Indexing Operations for Code Generation(Fixed-Point Designer))
Complex numbers (seeCode Generation for Complex Data(Fixed-Point Designer))
Numeric classes (seeSupported Variable Types(Fixed-Point Designer))
Double-precision, single-precision, and integer math
Fixed-point arithmetic (seeCode Acceleration and Code Generation from MATLAB(Fixed-Point Designer))
Arithmetic, relational, and logical operators
Local functions
Global variables
Persistent variables
Structures, including arrays of structures. Range computation for structures is supported via simulation mode only.
Characters
The complete set of Unicode®characters is not supported for code generation. Characters are restricted to 8 bits of precision in generated code. Because many mathematical operations require more than 8 bits of precision, it is recommended that you do not perform arithmetic with characters if you intend to convert your MATLAB algorithm to fixed point.
MATLAB classes. Range computation for MATLAB classes is supported via simulation mode only.
Automated conversion supports:
Class properties
Constructors
Methods
Specializations
It does not support class inheritance or packages. For more information, seeFixed-Point Code for MATLAB Classes(Fixed-Point Designer).
调用函数(se的能力eResolution of Function Calls for Code Generation)
Subset of MATLAB toolbox functions (seeFunctions Supported for Code Acceleration or C Code Generation(Fixed-Point Designer)).
Subset of DSP System Toolbox™ System objects.
The DSP System Toolbox System objects supported for automated conversion are:
dsp.BiquadFilter
(DSP System Toolbox)dsp.FIRDecimator
(DSP System Toolbox)dsp.FIRInterpolator
(DSP System Toolbox)dsp.FIRFilter
(DSP System Toolbox)(Direct Form and Direct Form Transposed only)dsp.FIRRateConverter
(DSP System Toolbox)dsp.VariableFractionalDelay
(DSP System Toolbox)
MATLAB Language Features Not Supported for Automated Fixed-Point Conversion
Fixed-Point Designer does not support the following features in automated fixed-point conversion:
Anonymous functions
Cell arrays
String scalars
Objects of value classes as entry-point function inputs or outputs
Function handles
Java®
Nested functions
Recursion
Sparse matrices
try
/catch
语句varargin
,varargout
, or generation of fewer input or output arguments than an entry-point function definesDot indexing properties of fixed-point data types.
Avoid using properties of fixed-point types in the code being converted by the Fixed-Point Converter app, and in MATLAB Function blocks being converted by the Fixed-Point Tool.