External Interfaces/API    

Examples of MATLAB as an Automation Client

This section provides examples of using MATLAB as an Automation client with controls and servers.

MATLAB Sample Control

MATLAB ships with a very simple example COM control that draws a circle on the screen, displays some text, and fires events when the user single- or double-clicks on the control. Create the control by running the mwsamp.m file in the directory, winfun\comcli, or type

This control is stored in the MATLAB bin, or executable, directory along with the control's type library. The type library is a binary file used by COM tools to decipher the control's capabilities. See the section Writing Event Handlers for other examples that use the mwsamp controls.

Using MATLAB as an Automation Client

This example uses MATLAB as an Automation client and Microsoft Excel as the server. It provides a good overview of typical functions. In addition, it is a good example of using the Automation interface of another application:


  Writing Event Handlers Additional COM Client Information