Écrire des applications COM fonctionnant avec MATLAB
Remarque
Au lieu d’écrire des applications qui appellent MATLAB en tant que serveur COM Automation, envisagez d’utiliser MATLAB Engine API pour .NET. Pour plus d’informations, consultez Appeler MATLAB à partir de .NET.
Pour des exemples, consultez :
Automation est un protocole COM qui permet à une application (le contrôleur ou le client) de contrôler les objets exportés par une autre application (le serveur). MATLAB supporte les fonctionnalités de serveur COM Automation sur les systèmes d’exploitation Microsoft® Windows®. Tout programme Windows pouvant être configuré en tant que client Automation peut contrôler MATLAB.
Si vous devez maintenir du code existant créé pour MATLAB R2022a ou version antérieure et appelant MATLAB en tant que serveur COM Automation, consultez ces rubriques :
Si vous créez des applications clientes en C, C++ ou Fortran, utilisez des applications MATLAB Engine plutôt qu’un serveur Automation. Pour plus d’informations, consultez Choosing Engine Applications.
Pour accéder à des composants COM depuis MATLAB, consultez Utiliser des objets COM dans MATLAB.
Fonctions
Rubriques
- Register MATLAB as COM Server
To use MATLAB as a COM server, register the application in the Windows registry.
- Create MATLAB Server
To create a server, use a programmatic identifier (ProgID) to identify the server.
- Convert MATLAB Types to COM Types
How MATLAB converts data from MATLAB types to COM types.
- Convert COM Types to MATLAB Types
How MATLAB converts data from a COM application into MATLAB types.
- Call MATLAB Function from C# Client
This example shows how to call a user-defined MATLAB function from a C# application using MATLAB as an Automation server.
- Call MATLAB Function from Visual Basic .NET Client
This example calls MATLAB functions from a Microsoft Visual Basic® client application.
- Pass Complex Data to MATLAB from C# Client
This example creates complex data in a client C# program and passes it to MATLAB.
Résolution des problèmes
Waiting for MATLAB Application to Complete
When you call a MATLAB function from another program, the program might display a timeout message while waiting for the MATLAB function to complete.