External Interfaces/API Reference | ![]() ![]() |
Read mxArray
s
from a MATLAB engine's workspace
Fortran Syntax
integer*4 function engGetMatrix(ep, name) integer*4 ep character*(*) name
name
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.
![]() | engGetFull | engOpen | ![]() |