Main Content

How Does MATLAB Deploy Functions?

To deploy MATLAB® functions, the compiler performs these tasks:

  1. Analyzes files for dependencies using a dependency analysis function. Dependencies are files included in the generated package and originate from functions called by the file. Dependencies are affected by:

    • File type — MATLAB, Java®, MEX, and so on.

    • File location — MATLAB, MATLAB toolbox, user code, and so on.

    For more information about dependency analysis, see Dependency Analysis Using MATLAB Compiler.

  2. Validates MEX-files. In particular, mexFunction entry points are verified.

    For more details about including MEX-files in packaged applications, see Access Files in Packaged Applications.

  3. Creates a deployable archive from the input files and their dependencies.

    For more details about deployable archives, see About the Deployable Archive.

  4. Generates target-specific wrapper code.

  5. Generates target-specific binary package.

    For library targets such as C++ shared libraries, Java packages, or .NET assemblies, the compiler invokes the corresponding third-party compiler.