External Code Integration - MATLAB & Simulink (original) (raw)

Main Content

Call external code from MATLABĀ® code

When you have external code, custom code, or legacy code developed in C/C++, you can integrate it directly into your MATLAB code. To call C/C++ functions, use the coder.ceval function. To pass data types to or from the external code that are not definable in MATLAB code, such as pointer types, FILE types for external file I/O, or other types, use coder.opaque. Configure your build to include and link to external source files, header files, object files, and libraries by using coder.updateBuildInfo. To provide an object-oriented interface to an external C library, package your function calls into a class derived from coder.ExternalDependency.

Classes

Functions

Topics

Troubleshooting