Main Content

enableservice

Enable, disable, or report status ofMATLABAutomation server

    Description

    example

    enableservice('AutomationServer',enable)enables or disables the MATLAB®Automation server. Ifenableistrue(logical1),enableserviceconverts an existing MATLAB session into an Automation server. Ifenableisfalse(logical0),enableservicedisables the MATLAB Automation server.

    This function is equivalent to calling this MATLAB startup command at the Windows operating system prompt:

    matlab -automation

    COM functions are available on Microsoft®Windows®systems only.

    example

    state = enableservice('AutomationServer')returns the current state of the Automation server. Ifstateis logical1(true), MATLAB is an Automation server.

    Examples

    collapse all

    state = enableservice('AutomationServer',true);
    state = enableservice('AutomationServer')

    Input Arguments

    collapse all

    Enable flag, specified astrueorfalse.

    Version History

    Introduced before R2006a