Contenu principal

Démarrer avec MATLAB Engine API pour Python

MATLAB® Engine API pour Python® propose un package Python nommé matlab qui permet d’appeler des fonctions MATLAB à partir de Python. Vous installez le package une seule fois, après quoi vous pouvez appeler le moteur dans vos sessions Python en cours ou futures. Pour obtenir de l’aide sur l’installation ou le démarrage du moteur, consultez les rubriques suivantes :

Le package matlab contient les éléments suivants :

Le moteur propose des fonctions pour appeler MATLAB. Les classes de tableaux comprennent des fonctions pour créer des tableaux MATLAB en tant qu’objets Python. Vous pouvez créer un moteur et appeler des fonctions MATLAB avec matlab.engine. Vous pouvez créer des tableaux MATLAB dans Python en appelant des constructeurs d’un type de tableau (par exemple, matlab.double pour créer un tableau de doubles). Les tableaux MATLAB peuvent servir d’arguments en entrée pour des fonctions MATLAB appelées avec le moteur.

Le tableau suivant décrit la structure du package matlab.

Package

Fonction ou classe

Description

matlab.engine

start_matlab()

Fonction Python pour créer un objet MatlabEngine et l’associer à un nouveau processus MATLAB

matlab.engine

MatlabEngine

Classe Python pour proposer des méthodes permettant d’appeler des fonctions MATLAB

matlab.engine

FutureResult

Classe Python pour stocker les résultats d’une fonction MATLAB appelée de manière asynchrone

matlab

double

Classe Python pour stocker un tableau MATLAB de type double

matlab

single

Classe Python pour stocker un tableau MATLAB de type single

matlab

int8

Classe Python pour stocker un tableau MATLAB de type int8

matlab

int16

Classe Python pour stocker un tableau MATLAB de type int16

matlab

int32

Classe Python pour stocker un tableau MATLAB de type int32

matlab

int64

Classe Python pour stocker un tableau MATLAB de type int64

matlab

uint8

Classe Python pour stocker un tableau MATLAB de type uint8

matlab

uint16

Classe Python pour stocker un tableau MATLAB de type uint16

matlab

uint32

Classe Python pour stocker un tableau MATLAB de type uint32

matlab

uint64

Classe Python pour stocker un tableau MATLAB de type uint64

matlab

logical

Classe Python pour stocker un tableau MATLAB de type logical

matlab

object

Classe Python pour stocker un handle vers un objet MATLAB

Voir aussi

Rubriques