::MatlabTop, Main, Index
The Matlab namespace provides commands to control MathWorks Matlab.
CommandsTop, Main, Index
ExecCmd [::Matlab]Top, Main, Index
Execute a Matlab command.
ExecCmd appId cmd
Parameters
appId | Identifier of the Matlab instance. |
cmd | String containing the Matlab command being executed. |
Return value
Returns the Matlab answer as a string.
proc ::Matlab::ExecCmd {appId cmd} {
# Execute a Matlab command.
#
# appId - Identifier of the Matlab instance.
# cmd - String containing the Matlab command being executed.
#
# Returns the Matlab answer as a string.
set retVal [$appId Execute $cmd]
return $retVal
}Open [::Matlab]Top, Main, Index
Open a Matlab instance.
Open ?visible?
Parameters
visible | If set to true, show the application window. Otherwise hide the application window. Optional, default true. |
Description
Use an already running instance, if available.
Return value
Returns the identifier of the Matlab application instance.
See also
proc ::Matlab::Open {{visible true}} {
# Open a Matlab instance.
#
# visible - If set to true, show the application window.
# Otherwise hide the application window.
#
# Use an already running instance, if available.
#
# Returns the identifier of the Matlab application instance.
#
# See also: OpenNew Visible Quit
variable matlabAppName
set appId [Cawt GetOrCreateApp $matlabAppName true]
Matlab Visible $appId $visible
return $appId
}OpenNew [::Matlab]Top, Main, Index
Open a new Matlab instance.
OpenNew ?visible?
Parameters
visible | If set to true, show the application window. Otherwise hide the application window. Optional, default true. |
Return value
Returns the identifier of the new Matlab application instance.
See also
proc ::Matlab::OpenNew {{visible true}} {
# Open a new Matlab instance.
#
# visible - If set to true, show the application window.
# Otherwise hide the application window.
#
# Returns the identifier of the new Matlab application instance.
#
# See also: Open Visible Quit
variable matlabAppName
set appId [Cawt GetOrCreateApp $matlabAppName false]
Matlab Visible $appId $visible
return $appId
}Quit [::Matlab]Top, Main, Index
Quit a Matlab instance.
Quit appId
Parameters
appId | Identifier of the Matlab instance. |
Return value
Returns no value.
See also
proc ::Matlab::Quit {appId} {
# Quit a Matlab instance.
#
# appId - Identifier of the Matlab instance.
#
# Returns no value.
#
# See also: Open
$appId Quit
}Visible [::Matlab]Top, Main, Index
Toggle the visibility of a Matlab application window.
Visible appId visible
Parameters
appId | Identifier of the Matlab instance. |
visible | If set to true, show the application window. Otherwise hide the application window. |
Return value
Returns no value.
See also
proc ::Matlab::Visible {appId visible} {
# Toggle the visibility of a Matlab application window.
#
# appId - Identifier of the Matlab instance.
# visible - If set to true, show the application window.
# Otherwise hide the application window.
#
# Returns no value.
#
# See also: Open OpenNew
$appId Visible [Cawt TclInt $visible]
}