Main Content

Data Exchange and Mapping with C++ Applications

Interact with MATLAB data from C++ applications

Examples that use the C++ Engine API and MATLAB Data API for C++ to pass data between C++ programs and MATLAB® functions.

Use the strongly typed interface to enforce a strict data type mapping between MATLAB and C++. Call the matlab.engine.typedinterface.generateCPP function to generate C++ header files for MATLAB functions and classes. Then, when you build a C++ application with these header files, you can use MATLAB functions and classes as C++ functions and classes without writing C++ code.


expand all

matlab.engine.typedinterface.generateCPPGenerate C++ code interface for MATLAB namespaces, classes, and functions (Since R2022a)


Create MATLAB Data Types

Strongly Typed Interface


MATLAB Engine API for C++ Exception Classes

The MATLAB engine API for C++ defines specific exception classes for MATLAB.