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. Some examples are Microsoft Excel® and Microsoft Access™, as well as Microsoft Visual Basic® and Microsoft Visual C++® programs.
To get started writing applications to call MATLAB as a COM Automation server:
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 COM Objects.
|Matrix from Automation server workspace|
|Matrix in Automation server workspace|
|Character array from Automation server|
|Character array in Automation server|
|Data from variable in Automation server workspace|
|Data from Automation server workspace|
|Data in Automation server workspace|
To use MATLAB as a COM server, register the application in the Windows registry.
To create a server, use a programmatic identifier (ProgID) to identify the server.
How MATLAB converts data from MATLAB types to COM types.
How MATLAB converts data from a COM application into MATLAB types.
This example shows how to call a user-defined MATLAB function from a C# application using MATLAB as an Automation server.
This example calls MATLAB functions from a Microsoft Visual Basic client application.
This example creates complex data in a client C# program and passes it to MATLAB.
When you call a MATLAB function from another program, the program might display a timeout message while waiting for the MATLAB function to complete.