matlab::engine::startMATLABAsync

Start MATLAB asynchronously

Description

FutureResult<std::unique_ptr<MATLABEngine>> startMATLABAsync(const std::vector<String>& options = std::vector<String>())

Start MATLAB® asynchronously in a separate process with optional MATLAB startup options.

Include

Namespace:

matlab::engine
IncludeMatlabEngine.hpp

Parameters

const std::vector<String>& options

Startup options used to launch MATLAB

Return Value

FutureResult<std::unique_ptr<MATLABEngine>>

A FutureResult object used to get the pointer to the MATLABEngine

Examples

expand all

Start MATLAB asynchronously and return a FutureResult object. Use the FutureResult to get a pointer to the MATLABEngine object.

FutureResult<std::unique_ptr<MATLABEngine>> matlabFuture = startMATLABAsync();
...
std::unique_ptr<MATLABEngine> matlabPtr = matlabFuture.get();

Introduced in R2017b