Main Content

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. You can specify multiple startup options. The engine supports all MATLAB startup options, except for the options listed in Unsupported Startup Options. For a list of options, see the platform-specific command matlab (Windows), matlab (macOS), or matlab (Linux).

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