Products & Services Industries Academia Support User Community Company

Learn more about MATLAB   

engGetVariable (C and Fortran) - Copy variable from MATLAB engine workspace

C Syntax

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

Fortran Syntax

mwPointer engGetVariable(ep, name)
mwPointer ep
character*(*) name

Arguments

ep

Engine pointer

name

Name of mxArray to get from MATLAB workspace

Returns

Pointer to a newly allocated mxArray structure, or NULL if the attempt fails. engGetVariable fails if the named variable does not exist.

Description

engGetVariable reads the named mxArray from the MATLAB engine session associated with ep.

Use mxDestroyArray to destroy the mxArray created by this routine when you are finished with it.

C Examples

UNIX[1] Operating Systems

See engdemo.c in the matlabroot/extern/examples/eng_mat folder for sample programs that illustrate how to call the engine functions from a C program.

Microsoft Windows Operating Systems

See engwindemo.c in the matlabroot/extern/examples/eng_mat folder for sample programs that illustrate how to call the engine functions from a C program for Windows systems.

See Also

engPutVariable, mxDestroyArray


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

  


Recommended Products

Includes the most popular MATLAB recorded presentations with Q&A sessions led by MATLAB experts.

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