This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

What You Need to Build MEX Files

To create a MEX file:

  • Install a MATLAB®-supported compiler. For more information, see Supported and Compatible Compilers. For information about installing a compiler, visit the vendor's website.

  • Assemble your functions and the MATLAB API functions into one or more C/C++ or Fortran source files.

  • Write a gateway function in one of your source files.

  • Use the MATLAB mex command, called a build script, to build a binary MEX file.

  • Use your binary MEX file like any MATLAB function.

If you have multiple compilers installed on your system, see Change Default Compiler.

See Also

Related Examples

More About

External Websites