| MATLAB Application Program Interface | Search  Help Desk |
| mexEvalString | Examples See Also |
Execute a MATLAB command in the workspace of the caller
C Syntax
#include "mex.h" int mexEvalString(const char *command);
Arguments
commandReturns
0 if successful, and a nonzero value if unsuccessful.Description
CallmexEvalString to invoke a MATLAB command in the workspace of the caller.
mexEvalString and mexCallMATLAB both execute MATLAB commands. However, mexCallMATLAB provides a mechanism for returning results (left-hand side arguments) back to the MEX-file; mexEvalString provides no way for return values to be passed back to the MEX-file.
All arguments that appear to the right of an equals sign in the command string must already be current variables of the caller's workspace.
Example
Seemexevalstring.c in the mex subdirectory of the examples directory.
See Also
mexCallMATLAB