Main Content

Write COM Applications to Work with MATLAB

Use MATLAB® as a COM Automation Server

To write applications that call MATLAB as a COM Automation server, consider using the MATLAB Engine API for .NET. For more information, see Call MATLAB from .NET. For examples, see:

Automation is a COM protocol that allows one application (the controller or client) to control objects exported by another application (the server). MATLAB supports COM Automation server capabilities on Microsoft® Windows® operating systems. Any Windows program that can be configured as an Automation client can control MATLAB.

If you need to maintain existing code created for MATLAB R2022a or earlier that calls MATLAB as a COM Automation server, see these topics.

If you build client applications using C, C++, or Fortran, then use MATLAB Engine Applications instead of an Automation server. For more information, see Choosing Engine Applications.

To access COM components from MATLAB, see Use COM Objects in MATLAB.

Fonctions

développer tout

comserverRegister, unregister, or query MATLAB COM server
regmatlabserverRegister current MATLAB as COM server
enableserviceEnable, disable, or report status of MATLAB Automation server
ExecuteExecute MATLAB command in Automation server
FevalExecute MATLAB function in Automation server
GetFullMatrixMatrix from Automation server workspace
PutFullMatrixMatrix in Automation server workspace
GetCharArrayCharacter array from Automation server
PutCharArrayCharacter array in Automation server
GetVariableData from variable in Automation server workspace
GetWorkspaceDataData from Automation server workspace
PutWorkspaceDataData in Automation server workspace
MaximizeCommandWindowOpen Automation server window
MinimizeCommandWindowMinimize size of Automation server window
QuitTerminate MATLAB Automation server

Rubriques

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.