External Interfaces Reference Previous page   Next Page
engPutVariable

Put variables into MATLAB engine workspace

C Syntax

Arguments

ep
   Engine pointer.

var_name
   Name given to the mxArray in the engine's workspace.

array_ptr
   mxArray pointer.

Description

engPutVariable writes mxArray array_ptr to the engine ep, giving it the variable name, var_name. If the mxArray does not exist in the workspace, it is created. If an mxArray with the same name already exists in the workspace, the existing mxArray is replaced with the new mxArray.

engPutVariable returns 0 if successful and 1 if an error occurs.

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.


Previous page  engPutMatrix (Obsolete) engSetEvalCallback (Obsolete) Next page

© 1994-2005 The MathWorks, Inc.