Call C++ from MATLAB
If you have a C or C++ shared library that exports functionality that can be called from another application, then you can use those classes and functions directly in MATLAB. To get started, you must first build an interface to the library to use to call the functionality in MATLAB. Someone who creates this interface is called a publisher. You can package the interface and share it with a MATLAB end user. For examples, see:
To call the library functionality in MATLAB, see Use Prebuilt MATLAB Interface to C++ Library.
To create MATLAB functions written in C or C++, see Write C++ Functions Callable from MATLAB (MEX Files) or Write C Functions Callable from MATLAB (MEX Files).