定点转换
将浮点代码转换为定点代码,优化定点数据类型(需要 Fixed-Point Designer™)
如果您有 Fixed-Point Designer 产品,为了符合目标硬件约束,请生成定点 C/C++ 代码。
类
coder.FixptConfig | Floating-point to fixed-point conversion configuration object |
函数
coder | 打开 MATLAB Coder |
codegen | 从 MATLAB 代码生成 C/C++ 代码。 |
coder.config | 创建 MATLAB Coder 代码生成配置对象 |
coder.approximation | Create function replacement configuration object |
主题
自动转换 - 编程工作流
- Automated Fixed-Point Conversion
Using the Fixed-Point Converter app for automated fixed-point conversion. - Convert MATLAB Code to Fixed-Point C Code
Generate fixed-point C code withcodegen
. - Automated Fixed-Point Conversion Best Practices
Generate fixed-point code according to best practices. - Propose Fixed-Point Data Types Based on Simulation Ranges
Propose fixed-point data types based on simulation ranges using thecodegen
function. - Propose Fixed-Point Data Types Based on Derived Ranges
Propose fixed-point data types based on static ranges using thecodegen
function. - Detect Overflows
Detect overflows at the command line. - MATLAB Language Features Supported for Automated Fixed-Point Conversion
For automated fixed-point conversion, use supported MATLAB® language features. - Fixed-Point Code for MATLAB Classes
Use supported constructs and coding style best practices for fixed-point conversion of MATLAB classes. - Enable Plotting Using the Simulation Data Inspector
Inspect and compare floating-point and fixed-point logged input and output data. - Visualize Differences Between Floating-Point and Fixed-Point Results
Use a custom plot function to compare the behavior of the generated fixed-point code against the behavior of the original floating-point MATLAB code.
自动转换 - App 工作流
- 将 MATLAB 代码转换为定点 C 代码
从浮点 MATLAB 代码生成定点 C 代码。 - Propose Fixed-Point Data Types Based on Simulation Ranges
Propose fixed-point data types based on simulation ranges using the MATLAB Coder™ app. - Propose Fixed-Point Data Types Based on Derived Ranges
Propose fixed-point data types based on static ranges using the MATLAB Coder app. - View and Modify Variable Information
View and modify variable information for fixed-point conversion. - Specify Type Proposal Options
Specify options used when proposing types for automated fixed-point conversion. - Detect Overflows
Detect overflows using the app. - Generated Fixed-Point Code
Avoid issues with generated fixed-point code. - Data Type Issues in Generated Code
Highlight potential data type issues in report. - Fixed-Point Code for MATLAB Classes
Use supported constructs and coding style best practices for fixed-point conversion of MATLAB classes. - Custom Plot Functions
Visualize numerical differences during fixed-point conversion. - Replacing Functions Using Lookup Table Approximations
Generate lookup table approximations to replace custom functions or functions that are not supported for fixed point. - Replace the exp Function with a Lookup Table
Replace a function with a lookup table approximation in fixed-point code generated with the MATLAB Coder app. - Replace a Custom Function with a Lookup Table
Replace a custom function with a lookup table approximation function by using the MATLAB Coder app. - Enable Plotting Using the Simulation Data Inspector
Inspect and compare floating-point and fixed-point logged input and output data. - Visualize Differences Between Floating-Point and Fixed-Point Results
Use a custom plot function to compare the behavior of the generated fixed-point code against the behavior of the original floating-point MATLAB code. - Detect Unexecuted and Constant-Folded Code
Learn how the app detects code that is not executed or code that is constant folded during simulation of your test file. - Convert Fixed-Point Conversion Project to MATLAB Scripts
Use project settings for fixed-point conversion at the command line.