Main Content

Write COM Applications to Work withMATLAB

使用MATLAB®as a COM Automation Server

Automation is a COM protocol that allows one application (thecontroller或者client) to control objects exported by another application (theserver). MATLAB supports COM Automation server capabilities on Microsoft®视窗®operating systems. Any Windows program that can be configured as an Automation client can control MATLAB. Some examples areMicrosoft Excel®Microsoft Access™, as well asMicrosoft Visual Basic®Microsoft Visual C++®程式。

To get started writing applications to call MATLAB as a COM Automation server:

如果使用C,C ++或FORTRAN构建客户端应用程序,请使用MATLAB引擎应用程序而不是自动化服务器。有关更多信息,请参阅Choosing Engine Applications.

To access COM components from MATLAB, seeUse COM Objects in MATLAB.

Functions

expand all

comserver Register, unregister, or queryMATLABCOM server
regmatlabserver Register currentMATLABas COM server
enableservice Enable, disable, or report status ofMATLABAutomation server
Execute ExecuteMATLABcommand in Automation server
Feval ExecuteMATLABfunction in Automation server
GetFullMatrix Matrix from Automation server workspace
PutFullMatrix Matrix in Automation server workspace
GetCharArray Character array from Automation server
PutCharArray Character array in Automation server
GetVariable 数据变量的自动化rver workspace
GetWorkspacedata Data from Automation server workspace
PutWorkspaceData Data in Automation server workspace
Maximizecommandwindow Open Automation server window
MinimizeCommandWindow 最小化自动化服务器窗口的尺寸
Quit TerminateMATLABAutomation server

Topics

Troubleshooting

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.

Related Information