Main Content

Start MATLAB and Call Functions from C++ Applications

Start and connect to MATLAB, call MATLAB functions from C++ applications

Use the C++ Engine API to interact with MATLAB® from C++ applications. The C++ Engine API allows you to start a MATLAB session or connect to an existing session, read and set the value of variables, evaluate MATLAB statements, call MATLAB functions, and receive results.


expand all

matlab.engine.shareEngineConvert running MATLAB session to shared session
matlab.engine.engineNameReturn name of shared MATLAB session
matlab.engine.isEngineSharedDetermine if MATLAB session is shared
matlab::engine::startMATLABStart MATLAB synchronously
matlab::engine::startMATLABAsyncStart MATLAB asynchronously
matlab::engine::connectMATLABConnect to shared MATLAB session synchronously
matlab::engine::connectMATLABAsyncConnect to shared MATLAB session asynchronously
matlab::engine::findMATLABFind shared MATLAB sessions synchronously
matlab::engine::findMATLABAsyncFind shared MATLAB sessions asynchronously
matlab::engine::terminateEngineClientFree engine resources during run time


expand all

matlab::engine::MATLABEngineEvaluate MATLAB functions from C++ program


Start and Connect to MATLAB

Call Functions