MATLAB: How to launch MATLAB 7.1 (R14SP3) as a COM Automation server in full desktop mode

automationcomdesktopfullMATLAB

I would like to use the ACTXSERVER command from MATLAB, or alternatively use Visual Basic code, to launch MATLAB as a COM Automation server in full desktop mode. I observe that Excel Link 2.3 (R14SP3) does have that capability, and I would like to know how this is accomplished.

Best Answer

This change has been incorporated into the documentation in Release 2010a (R2010a). For previous releases, read below for any additional information:
To launch MATLAB as a COM Automation server in full desktop mode, use the programmatic identifier Matlab.Desktop.Application. For example, to do this from a MATLAB session, type the following at the MATLAB Command Prompt:
h = actxserver('Matlab.Desktop.Application')
In Visual Basic, your code might look something like this:
Dim MatLab As Object
Dim Result As String
MatLab = CreateObject("Matlab.Desktop.Application")
Result = MatLab.Execute("surf(peaks)")