Execute MATLAB command in Automation server
BSTR Execute([in] BSTR command)
Execute(command As String) As String
result = Execute(h,'command')
The Execute
function executes the MATLAB® statement specified by command
in the MATLAB Automation server attached to h
. To call a function
with arguments, use Feval
.
The server returns output from the command and any MATLAB warning or error messages in result
. If you terminate
the MATLAB command with a semicolon and there are no warnings or error messages,
result
might be empty.
COM functions are available on Microsoft® Windows® systems only.
To display output from Execute
in the client window,
specify an output variable, result
.
If there is an error, the Execute
function
returns the MATLAB error message with the characters ???
prepended
to the text.