MATLAB Application Program Interface Reference Help Desk

engGetMatrix

Purpose

Read mxArrays from a MATLAB engine's workspace

Fortran Syntax

Arguments

ep

Engine pointer.

name

Name of mxArray to get from engine.

Description

This routine allows you to copy an mxArray out of a MATLAB engine's workspace.

engGetMatrix reads the named mxArray from the engine pointed to by ep and returns a pointer to a newly allocated mxArray structure, or 0 if the attempt fails.

Be careful in your code to free the mxArray created by this routine when you are finished with it.

On UNIX systems, engGetMatrix issues the command save stdio name to MATLAB, causing MATLAB to write the named mxArray down its stdout pipe, which is in turn caught and decoded by engGetMatrix.

Example

See fengdemo.f in the eng_mat subdirectory of the examples directory for a sample program that illustrates how to call the MATLAB engine functions from a Fortran program.

Note: Fortran engine routines are not available on Windows.



[ Previous | Help Desk | Next ]