Execute MATLAB command in caller workspace and capture error information
#include "mex.h" mxArray *mexEvalStringWithTrap(const char *command);
#include "fintrf.h" mwPointer mexEvalStringWithTrap(command) character*(*) command
command
String containing the MATLAB® command to execute
Object ME
of class MException
The mexEvalStringWithTrap
function performs
the same function as mexEvalString
. However, if MATLAB detects
an error when executing command
, MATLAB returns
control to the line in the MEX-file immediately following the call
to mexEvalStringWithTrap
.