Start MATLAB engine session
#include "engine.h" Engine *engOpen(const char *startcmd);
engOpen
starts a MATLAB® process for using MATLAB as a computational engine.
engOpen
launches MATLAB without a desktop.
The function opens a COM channel to MATLAB. The MATLAB software you registered during installation starts. If you did not register during installation, then see Register MATLAB as a COM Server.
On UNIX® systems, engOpen
:
Creates two pipes.
Forks a new process. Sets up the pipes to pass
stdin
and stdout
from MATLAB (parent) software to two file descriptors in the engine
program (child).
Executes a command to run MATLAB software (rsh
for remote execution).
See these examples in
:matlabroot
/extern/examples/eng_mat
engdemo.c
for a C example on UNIX operating systems.
engwindemo.c
for a C example on Microsoft®
Windows operating systems.