Datenaustausch und -zuordnung bei C++ Anwendungen
Beispiele, bei denen C++ Engine-API und MATLAB-Daten-API für C++ zum Austausch von Daten zwischen C++-Programmen und MATLAB®-Funktionen verwendet wird.
Verwenden Sie die streng typisierte Schnittstelle, um eine strikte Datentyp-Zuordnung zwischen MATLAB und C++ zu erzwingen. Rufen Sie die Funktion matlab.engine.typedinterface.generateCPP
auf, um C++ Header-Dateien für MATLAB-Funktionen und -Klassen zu erstellen. Wenn Sie daraufhin mit diesen Header-Dateien eine Anwendung in C++ erstellen, können Sie Funktionen und Klassen von MATLAB als C++ Funktionen und -Klassen nutzen, ohne C++ Code zu schreiben.
Funktionen
Themen
Erstellen von MATLAB-Datentypen
- Create Structure Arrays from C++
Create structure arrays in C++ and pass to MATLAB or get structure arrays defined in MATLAB. - Create Cell Arrays from C++
Create heterogeneous arrays in C++ to use as MATLAB cell arrays. - Pass Enumerations to MATLAB from C++
Pass members of a MATLAB enumeration class to MATLAB from C++. - Pass Sparse Arrays to MATLAB from C++
Pass arrays to MATLAB as MATLAB sparse arrays. - Use MATLAB Handle Classes in C++
Integrate MATLAB handle classes with C++ applications.
Streng typisierte Schnittstelle
- What Is Strongly Typed Interface for C++?
The C++ MATLAB Data API interface supports strongly typed MATLAB code. - Write MATLAB Code for Strongly Typed C++ Interface
Specify data type requirements in MATLAB code. - Create C++ Header File from Strongly Typed MATLAB Function
Integrate a MATLAB Data API C++ header file from a strongly typed MATLAB function with C++ application code that calls MATLAB. - Data Type Mappings Between C++ and Strongly Typed MATLAB Code
Refer to data type mappings between C++ and MATLAB when using strongly typed MATLAB code. - Limitations of Strongly Typed Interface for C++
Strongly typed interface for C++ features not supported in MATLAB.
Fehlersuche
MATLAB Engine API for C++ Exception Classes
The MATLAB engine API for C++ defines specific exception classes for MATLAB.