External Interfaces Reference Previous page   Next Page
engGetVariable

Copy variable from MATLAB engine workspace

C Syntax

Arguments

ep
   Engine pointer.

var_name
   Name of mxArray to get from MATLAB.

Description

engGetVariable reads the named mxArray from the MATLAB engine session associated with ep and returns a pointer to a newly allocated mxArray structure, or NULL if the attempt fails. engGetVariable fails if the named variable does not exist.

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

Examples

UNIX

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.

Windows

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

engPutVariable


Previous page  engGetMatrix (Obsolete) engGetVisible Next page

© 1994-2005 The MathWorks, Inc.