engOpen (Fortran) - Start MATLAB engine session - MATLAB (original) (raw)

Main Content

Start MATLAB engine session

Fortran Syntax

#include "engine.h" mwPointer engOpen(startcmd) character*(*) startcmd

Description

engOpen starts a MATLAB® process for using MATLAB as a computational engine.

Windows Platforms

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.

UNIX Platforms

On UNIX® systems, engOpen:

  1. Creates two pipes.
  2. 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).
  3. Executes a command to run MATLAB software (rsh for remote execution).

Input Arguments

expand all

MATLAB startup command, specified as character*(*).

On Windows® systems, the startcmd string must beNULL.

On UNIX systems:

Output Arguments

expand all

Handle to MATLAB engine, specified as mwPointer. ReturnsNULL if the open fails.

Examples

To open an example, type:

edit([fullfile(matlabroot,"extern","examples","engmat","filename")]);

where filename is:

Version History

Introduced before R2006a