External Interfaces/API Reference | ![]() ![]() |
Copy a variable from a MATLAB engine's workspace
C Syntax
#include "engine.h" mxArray *engGetArray(Engine *ep, const char *name);
name
mxArray
to get from engine.
Description
engGetArray
reads the named mxArray
from the engine pointed to by ep
and returns a pointer to a newly allocated mxArray
structure, or NULL
if the attempt fails. engGetArray
will fail if:
Be careful in your code to free the mxArray
created by this routine when you are finished with it.
Example
See engdemo.c
in the eng_mat
subdirectory of the examples
directory for a sample program that illustrates how to call the MATLAB engine functions from a C program.
See engwindemo.c
in the eng_mat
subdirectory of the examples
directory for a sample program that illustrates how to call the MATLAB engine functions from a C program for Windows.
See Also
![]() | engEvalString | engGetFull (Obsolete) | ![]() |