uisimcontrols
Description
scntrl = uisimcontrols
creates simulation controls UI components in
a new figure.
scntrl = uisimcontrols(
creates
simulation control buttons UI components in the specified parent
)parent
container.
scntrl = uisimcontrols(___,
specifies simulation control button properties using one or more name-value arguments. Use
this option with any of the input argument combinations in the previous syntaxes.Name,Value
)
Examples
Create a Simulation Control UI Component in a Control Panel
Create a simulation controls UI component in a panel.
fig = uifigure('Name','myFigure'); panel = uipanel(fig) simControl = uisimcontrols(panel)
Specify a Simulation
Object for Simulation Control Options
Create a simulation control UI component in a UI figure, and then
specify a Simulation
object for the simulation controls.
Create a UI figure window containing simulation controls and a panel.
fig = uifigure('Name','myFigure'); panel = uipanel(fig) simCntrl = uisimcontrols(panel)
Specify a Simulation
object to use the simulation controls
buttons with a model.
runSim = simulation('mdlName')
simCntrl.Simulation = runSim;
Now, you can use the simulation controls button to control the model simulation.
Input Arguments
parent
— Parent container
Figure
object (default) | Tab
object | Panel
object | GridLayout
object | ...
Parent container, specified as a Figure
object created using the
uifigure
function or one of its child containers, such as a
Tab
, Panel
, or GridLayout
object. If you do not specify a parent container, MATLAB® calls the uifigure
function to create a new
Figure
object that serves as the parent container.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Example: uisimcontrols(StartText="Start Sim")
Note
The properties listed here are a subset of the available properties. For the full list, see SimulationControls Properties.
StartText
— Start button label
'Run'
(default) | character vector | cell array of character vectors | string scalar | string array
Start button label, specified as a character vector, cell array of character vectors, string scalar, string array, or 1-D categorical array. Specify a character vector or string scalar to label the button with a single line of text. Use a cell array or string array to label the button with multiple lines of text. Each element in the array represents a separate line of text. If you specify this property as a categorical array, MATLAB uses the values in the array, not the full set of categories
Example: uisimcontrols('StartText','Start Sim')
PauseText
— Pause state label
'Pause'
(default) | character vector | cell array of character vectors | string scalar | string array
Pause button label, specified as a character vector, cell array of character vectors, string scalar, string array, or 1-D categorical array. Specify a character vector or string scalar to label the button with a single line of text. Use a cell array or string array to label the button with multiple lines of text. Each element in the array represents a separate line of text. If you specify this property as a categorical array, MATLAB uses the values in the array, not the full set of categories
Example: uisimcontrols('PauseText','Pause Sim')
ContinueText
— Continue simulation label
'Continue'
(default) | character vector | cell array of character vectors | string scalar | string array
Continue button label, specified as a character vector, cell array of character vectors, string scalar, string array, or 1-D categorical array. Specify a character vector or string scalar to label the button with a single line of text. Use a cell array or string array to label the button with multiple lines of text. Each element in the array represents a separate line of text. If you specify this property as a categorical array, MATLAB uses the values in the array, not the full set of categories
Example: uisimcontrols('ContinueText','Cont.')
StopText
— Stop button label
'Stop'
(default) | character vector | cell array of character vectors | string scalar | string array
Stop button label,, specified as a character vector, cell array of character vectors, string scalar, string array, or 1-D categorical array. Specify a character vector or string scalar to label the button with a single line of text. Use a cell array or string array to label the button with multiple lines of text. Each element in the array represents a separate line of text. If you specify this property as a categorical array, MATLAB uses the values in the array, not the full set of categories
Example: uisimcontrols('StopText','Stop Sim')
Simulation
— Simulation representation
empty (default) | simulink.Simulation
object
Simulation representation that provides an interface to control the simulation of
a Simulink® model, specified as a Simulation
object.
Version History
Introduced in R2024a
See Also
Functions
Properties
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)