C 代码生成
使用 MATLAB Coder™ 和 Simulink Coder 产品,从 DSP System Toolbox™ 中的信号处理算法生成 C 和 C++ 代码。您可以将生成的代码作为源代码、静态库、动态库甚至独立可执行文件集成到您的工程中。有关详细信息,请参阅Understanding C Code Generation in DSP System Toolbox。有关支持 C/C++ 代码生成的函数和模块的列表,请分别参阅Functions and System Objects in DSP System Toolbox that Support C Code Generation和Simulink Blocks in DSP System Toolbox that Support C Code Generation。
此外,您还可以使用 Embedded Coder® 产品生成针对 ARM® Cortex®-M 和 ARM Cortex-A 处理器优化的代码。有关详细信息,请参阅基于 ARM Cortex-M 和 ARM Cortex-A 处理器的代码生成。在生成代码后,您可以将代码转移到另一个没有安装 MATLAB 和 Simulink 产品的开发环境中。有关示例,请参阅Relocate Code Generated from MATLAB Code to Another Development Environment和Relocate Code Generated from a Simulink Model to Another Development Environment。
函数
codegen | 从 MATLAB 代码生成 C/C++ 代码 |
主题
- Understanding C Code Generation in DSP System Toolbox
Generate C code from DSP System Toolbox signal processing algorithms using MATLAB Coder and Simulink Coder.
- Functions and System Objects in DSP System Toolbox that Support C Code Generation
Find the functions and System objects that support C/C++ code generation in DSP System Toolbox using the filtered view of the generated list.
- Simulink Blocks in DSP System Toolbox that Support C Code Generation
Find the blocks that support C/C++ code generation in DSP System Toolbox using the filtered view of the generated list.
- 支持 C/C++ 代码生成的 MATLAB 语言功能 (MATLAB Coder)
使用代码生成支持的 MATLAB 语言功能和函数。
- MATLAB 代码生成中的 System object (MATLAB Coder)
在 MATLAB 生成的代码中使用 System object 的特殊注意事项。
- Generate C Code from MATLAB Code
Prepare MATLAB code for code generation and generate C-MEX code and a C executable.
- Relocate Code Generated from MATLAB Code to Another Development Environment
Generate an executable from MATLAB algorithm. Package the executable to run on an external environment.
- Generate C Code from Simulink Model
Build an executable and run the executable within MATLAB.
- Relocate Code Generated from a Simulink Model to Another Development Environment
Generate an executable from Simulink model and package the executable to run on an external environment.
- In-Place Memory Optimization
Optimize the memory usage of generated code through the technique of in-place memory optimization.
- Plot Array on Android Device
Array Plot with Android Devices.
- How To Run a Generated Executable Outside MATLAB
Commands to set the system environment for generating executables that require prebuilt dll files.
- Use Generated Code to Accelerate an Application Deployed with MATLAB Compiler
Use MATLAB Coder to accelerate an algorithm and MATLAB Compiler™ to deploy the application.