Call MATLAB from C - MATLAB & Simulink (original) (raw)

Main Content

Run MATLAB® code from C programs, using mxArray

Note

Functions in the Engine API for C work with the MATLABmxArray data structure, which is defined in the C Matrix API. To write applications using modern C++ features, see Call MATLAB from C++.

Engine applications are standalone programs that allow you to call MATLAB from your own C/C++ programs, using MATLAB as a computation engine. To build an engine application, call themex function.

Engine applications require an installed version of MATLAB; you cannot run the MATLAB engine on a machine that only has the MATLAB Runtime.

Engine API for C

Topics

Write Engine Applications

Build and Run Windows Applications

Build and Run Mac Applications

Build and Run Linux Applications

Troubleshooting