mexGetVariable (C)
Copy of variable from specified workspace
C Syntax
#include "mex.h" mxArray *mexGetVariable(const char *workspace, const char *varname);
Description
Note
To write MEX functions using modern C++ features and theMATLAB Data API for C++, seeWrite C++ Functions Callable from MATLAB (MEX Files).
CallmexGetVariable
to get a copy of the specified variable. The returnedmxArray
包含的所有数据的副本和特点s that the variable had in the other workspace. Modifications to the returnedmxArray
do not affect the variable in the workspace unless you write the copy back to the workspace withmexPutVariable
.
UsemxDestroyArray
to destroy themxArray
created by this routine when you are finished with it.
Input Arguments
Output Arguments
Examples
See these examples in
:matlabroot
/extern/examples/mex