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 controller can control MATLAB. Some examples are Microsoft Excel® and Microsoft Access™, and many Microsoft Visual Basic® and Microsoft Visual C++® programs.
If you build client application using C/C++, or Fortran, use MATLAB Engine API for C, C++, and Fortran instead of an Automation server.
||Execute MATLAB command in Automation server|
||Evaluate MATLAB function in Automation server|
||Character array from Automation server|
||Store character array in Automation server|
||Matrix from Automation server workspace|
||Matrix in Automation server workspace|
||Data from variable in Automation server workspace|
||Data from Automation server workspace|
||Data in Automation server workspace|
||Open Automation server window|
||Minimize size of Automation server window|
||Terminate MATLAB Automation server|
This example calls a user-defined MATLAB function named
a Microsoft Visual Basic client application through a COM interface.
This example shows how to call a user-defined MATLAB function,
from a C# application.
This example creates complex data in the client C# program and passes it to MATLAB.
You can find out what methods are available from a MATLAB Automation server using the Object Browser of your Microsoft Visual Basic client application.
To launch MATLAB as a COM Automation server in full desktop
mode, use the programmatic identifier
Microsoft Windows operating system automatically creates an Automation server when a controller application first establishes a server connection.
To use MATLAB as an Automation server, you first must register the application in the Windows registry, which happens when you install a new version of MATLAB.
How to configure MATLAB software as a COM Automation server
To create a server, you need a programmatic identifier (ProgID) to identify the server.
It is not always necessary to create a new instance of a MATLAB server whenever your application needs some task done in MATLAB.
How MATLAB converts data from MATLAB types to COM types.
How MATLAB converts data from a COM application into MATLAB types.
You can start the MATLAB Automation server in one of two modes – shared or dedicated.
To pass a
VT_DATE type input to a Visual Basic program
or an ActiveX® control method, use the MATLAB class
Data types for arguments and return values of server functions are expressed as Automation data types — language-independent types defined by the Automation protocol.
Visible property to make MATLAB visible
in a server application.
Distributed Component Object Model (DCOM) is a protocol that allows COM connections to be established over a network.
When you call a MATLAB function from another program, the program might display a timeout message while waiting for the MATLAB function to complete.