engPutVariable (C and Fortran) - Put variables into MATLAB engine workspace

C Syntax

#include "engine.h"
int engPutVariable(Engine *ep, const char *name, const mxArray 
     *pm);

Fortran Syntax

integer*4 engPutVariable(ep, name, pm)
mwPointer ep, pm
character*(*) name

Arguments

ep

Engine pointer

name

Name given to the mxArray in the engine's workspace

pm

mxArray pointer

Returns

0 if successful and 1 if an error occurs.

Description

engPutVariable writes mxArray pm to the engine ep, giving it the variable name 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.

C Examples

UNIX[1] Operating Systems

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.

Microsoft Windows Operating Systems

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 systems.

See Also

engGetVariable


[1] UNIX is a registered trademark of The Open Group in the United States and other countries.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS