execute a list of MATLAB® code strings through the Maple-MATLAB® link - MapleSim Connector Help

MapleSimConnector[ExecuteMCode] - execute a list of MATLAB® code strings through the Maple-MATLAB® link

 Calling Sequence ExecuteMCode(codeStr, opts)

Parameters

 codeStr - string; a list of MATLAB® command strings to be executed opts - (optional) equation(s) of the form option = value; specify options for the ExecuteMCode command

Description

 • The ExecuteMCode command sends MATLAB® command strings contained within input string codeStr to MATLAB® for execution one line at a time. Each line is separated by the string setting in the eol option.
 • This procedure requires the MATLAB® connection to be working and the MATLAB® mex compiler be set up. For more information, see MapleSimConnector[setup].
 • This command changes the working directory of MATLAB® to the location specified by the path option before executing the commands.
 • This command examines the input MATLAB® command strings to determine if the mex command is used. If it is, a test is performed to ensure mex has been set up properly in MATLAB®. If mex has not been set up, an error is raised. For instructions on how to set up the mex command, refer to the MATLAB® documentation.
 • This command also tests if Simulink® is installed and configured properly. An error is raised if Simulink® is not found. Instructions on how to install and set up Simulink®, refer to the Simulink® documentation.
 • After the checking process is complete, the MATLAB® command strings contained in CodeStr are sent to MATLAB® through the Matlab[evalM] command one line at a time for execution.

Examples

 > $\mathrm{with}\left(\mathrm{MapleSimConnector}\right):$
 > $\mathrm{ExecuteMCode}\left("simulink;"\right)$