You can call your own C, C++, or Fortran subroutines from the MATLAB® command line as if they were built-in functions. These programs, called binary MEX files, are dynamically linked subroutines that the MATLAB interpreter loads and executes. The MEX file contains only one function or subroutine, and its name is the MEX file name. To call a MEX file, use the name of the file, without the file extension.
For information about using a MEX function that someone else created, see MEX File Functions.
mex stands for “MATLAB executable” and has
different meanings, as shown in the following table.
|source MEX file||C, C++, or Fortran source code file.|
|binary MEX file or MEX function||Dynamically linked subroutine executed in the MATLAB environment.|
|MEX function library||MATLAB C and Fortran API Reference library to perform operations in the MATLAB environment.|
|MATLAB function to create a binary file from a source file.|