| Contents | Index |
#include "engine.h" Engine *engOpen(const char *startcmd);
mwPointer engOpen(startcmd) character*(*) startcmd
Pointer to an engine handle, or NULL if the open fails.
This routine allows you to start a MATLAB process for using MATLAB as a computational engine.
engOpen starts a MATLAB process using the command specified in the string startcmd, establishes a connection, and returns an engine pointer.
On UNIX systems, if startcmd is NULL or the empty string, engOpen starts a MATLAB process on the current host using the command matlab. If startcmd is a hostname, engOpen starts a MATLAB process on the designated host by embedding the specified hostname string into the larger string:
"rsh hostname \"/bin/csh -c 'setenv DISPLAY\ hostname:0; matlab'\""
If startcmd is any other string (has white space in it, or nonalphanumeric characters), MATLAB executes the string literally.
On UNIX systems, engOpen performs the following steps:
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).
On Windows systems, engOpen opens a COM channel to MATLAB. The MATLAB software you registered during installation starts. If you did not register during installation, on the command line you can enter the command:
!matlab /regserver
See Introducing MATLAB COM Integration for additional details.
See the following 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.
fengdemo.F for a Fortran example.

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.
| © 1984-2012- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |