You can integrate external code with MATLAB® code intended for code generation. The external code can be external libraries, object files, or C/C++ source code.
The basic workflow is:
Create the external code.
Call the external code from MATLAB code.
Specify the external file locations.
Generate code from the MATLAB code.
Call the external code and specify the file locations in one of the following ways:
Use coder.ExternalDependency
to encapsulate
the interface to the external code. The updateBuildInfo
method
specifies file locations and other build information. Write methods
that define the programming interface to the external functions. In
your MATLAB code, use these methods to call the external functions.
Use coder.ceval
to call external
functions from your MATLAB code. When you generate code, define
the locations of external files.
Use coder.ceval
to call external
functions from your MATLAB code. Use coder.updateBuildInfo
to
specify external file locations and update build information.
coder.ceval
| coder.ExternalDependency
| coder.updateBuildInfo