Use Matrix Library and the MEX Library functions in gateway and computational routines to interact with data in the MATLAB® workspace. These libraries are part of the MATLAB C/C++ and Fortran API Reference library.
To use these functions, include the
which declares the entry point and interface routines. Put this statement
in your source file:
Use Matrix Library functions to pass
the type MATLAB uses to store arrays, to and from MEX files. For examples
using these functions, see
Use MEX Library functions to perform operations in the MATLAB environment. For
examples using these functions, see
Unlike MATLAB functions, MEX file functions do not have their
own variable workspace. MEX file functions operate
in the caller workspace.
mexEvalString to evaluate the string in the
to get and put variables into the caller workspace.
The Matrix and MEX libraries use the MATLAB preprocessor
size values, such as array dimensions and number of elements.
index values, such as indices into arrays.