Documentation

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 affect deployability and originate from functions called by the file. Deployability is affected by:

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

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

    For more information about how the compiler does dependency analysis, see Dependency Analysis.

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

    For more details about MEX-file processing, see MEX-Files, DLLs, or Shared Libraries.

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

    For more details about deployable archives see 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 required third-party compiler.