Skip to Main Content Skip to Search
Product Documentation

enableservice - Enable, disable, or report status of MATLAB Automation server

Syntax

state = enableservice('AutomationServer',enable)
state = enableservice('AutomationServer')

Description

state = enableservice('AutomationServer',enable) enables or disables the MATLAB Automation server. If enable is true (logical 1), enableservice converts an existing MATLAB session into an Automation server. If enable is false (logical 0), enableservice disables the MATLAB Automation server. state indicates the previous state of the Automation server. If state = 1, MATLAB was an Automation server. If state = 0, MATLAB was not an Automation server.

state = enableservice('AutomationServer') returns the current state of the Automation server. If state is logical 1 (true), MATLAB is an Automation server.

COM functions are available on Microsoft Windows systems only.

Examples

Enable the Automation server in the current MATLAB session:

state = enableservice('AutomationServer',true);
 

Show the current state of the MATLAB session. MATLAB displays true:

state = enableservice('AutomationServer')
 

Enable the Automation server and show the previous state. MATLAB displays true. The previous state can be the same as the current state:

state = enableservice('AutomationServer',true)

See Also

actxserver

How To

  


Free MATLAB Interactive Kit

Explore how to use MATLAB to make advancements in engineering and science.


Download free kit

Trials Available

Try the latest version of MATLAB and other MathWorks products.


Get trial software
 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS