MATLAB Engine APIs for C and Fortran - MATLAB & Simulink (original) (raw)

Main Content

The MATLAB® C and Fortran engine library contains routines that allow you to call MATLAB from your own programs, using MATLAB as a computation engine. Using the MATLAB engine requires an installed version of MATLAB; you cannot run the MATLAB engine on a machine that only has the MATLAB Runtime.

Engine programs are standalone programs. These programs communicate with a separate MATLAB process via pipes, on UNIX® systems, and through a Microsoft® Component Object Model (COM) interface, on Microsoft Windows® systems. MATLAB provides a library of functions that allows you to start and end the MATLAB process, send data to and from MATLAB, and send commands to be processed in MATLAB.

Some of the things you can do with the MATLAB engine are:

The MATLAB engine operates by running in the background as a separate process from your own program. Some advantages are:

The MATLAB engine cannot read MAT-files in a format based on HDF5. These MAT-files save data using the -v7.3 option of the save function or are opened using the w7.3 mode argument to the C or FortranmatOpen function.

Note

To run MATLAB engine on the UNIX platform, you must have the C shell csh installed at/bin/csh.

Communicating with MATLAB Software

On UNIX systems, the engine library communicates with the engine using pipes, and, if needed, rsh for remote execution. On Microsoft Windows systems, the engine library communicates with the engine using a Component Object Model (COM) interface.

See Also

Topics