Escribir aplicaciones COM que funcionen con MATLAB
Nota
En lugar de escribir aplicaciones que llamen a MATLAB como servidor de automatización de COM, considere utilizar la API del motor de MATLAB para .NET. Para obtener más información, consulte Llamar a MATLAB desde .NET.
Para obtener ejemplos, consulte:
Automatización es un protocolo COM que permite que una aplicación (el controlador o el cliente) controle objetos exportados por otra aplicación (el servidor). MATLAB es compatible con las funciones del servidor de automatización de COM en sistemas operativos Microsoft® Windows®. Cualquier programa de Windows que pueda configurarse como un cliente de automatización puede controlar MATLAB.
Si necesita mantener código existente creado para la versión R2022a de MATLAB o una versión anterior que llame a MATLAB como servidor de automatización de COM, consulte estos temas.
Si crea aplicaciones cliente con C, C++ o Fortran, use las aplicaciones del motor de MATLAB en lugar de recurrir a un servidor de automatización. Para obtener más información, consulte Choosing Engine Applications.
Para acceder a componentes de COM desde MATLAB, consulte Utilizar objetos de COM en MATLAB.
Funciones
Temas
- 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.
Solución de problemas
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.