Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

Import Compiled Python Packages

The MATLAB® Compiler SDK™ Python® target generates the Python code into a package that must be imported into Python before you can use the compiled MATLAB functions. You specify the package name and the namespace when compiling the MATLAB functions.

  • If you use the Library Compiler app, you specify the package name with the Library Name field and the namespace with the Namespace field.

    The Library Name field defaults to the name of the first MATLAB file listed in the app. You can leave the Namespace field empty.

  • If you use the mcc function, you specify the package name and namespace as part of the -W python:namespace.packageName flag.

    Specifying the namespace is optional.

For example, if you compile your MATLAB functions and specify the package name asaddmatrix with no namespace, you import it as follows:

import addmatrix

If you compile your MATLAB functions using the mcc command with the option -W python:com.mathworks.addmatrix, you import it as follows:

import com.mathworks.addmatrix

Related Topics

Was this topic helpful?