C/C++ 代码生成
从 MATLAB® 代码生成 C 代码
使用 MATLAB Coder™ 或 codegen 命令,从 MATLAB 代码生成 C/C++ 源代码、静态库、动态库或可执行文件。您需要 MATLAB Coder 来为支持的函数生成独立的 C 和 C++ 代码。
有关支持代码生成的函数的列表,请参阅函数列表(C/C++ 代码生成)。
主题
- Generate Standalone C Static Library at the Command Line (MATLAB Coder)
Generate a C static library from a MATLAB function by using the
codegencommand. - Generate Deployable Standalone Code by Using the MATLAB Coder App (MATLAB Coder)
Follow the steps of the code generation workflow to generate a standalone C++ dynamic linked library.
- Human Activity Recognition Simulink Model for Smartphone Deployment (Statistics and Machine Learning Toolbox)
Generate code from a classification Simulink® model prepared for deployment to a smartphone.






