Algorithm Design Basics
|Control code generation from protected MATLAB files|
|Call external C/C++ function|
|Include header file in generated code|
|Name C structure type in generated code|
|Declare a function as extrinsic and execute it in MATLAB|
|Control inlining of a specific function in generated code|
|Load compile-time constants from MAT-file or ASCII file into caller workspace|
|Declare uninitialized variables in code generation|
|Declare variable in generated code|
|Indicate data to pass by reference|
|Determine if function is suitable for code generation|
|Indicate read-only data to pass by reference|
|Determine if code generation target is specified target|
|Declare variable-size data|
|Indicate write-only data to pass by reference|
|Update build information object |
Examples and How To
- Check Code Using the Code Generation Readiness Tool
Run the code generation readiness tool at the command line or from the current folder browser.
- When to Generate Code from MATLAB Algorithms
Decide whether to generate code for your application.
- Which Code Generation Feature to Use
Choose code generation feature for your application.
- Prerequisites for C/C++ Code Generation from MATLAB
Code generation from MATLAB® code requires the MATLAB Coder™ product and a C/C++ compiler.
- Differences Between Generated Code and MATLAB Code
Generated C/C++ code can behave differently than original MATLAB source code.
- Code Generation Readiness Tool
The code generation readiness tool screens MATLAB code for features and functions that code generation does not support.
- MATLAB Language Features Supported for C/C++ Code Generation
Use the MATLAB language features and functions that code generation supports.
- MATLAB Code Design Considerations for Code Generation
When writing MATLAB for code generation, consider design constraints.
Define the output type for external C/C++ function calls.