Package:matlab.system.display
Superclasses:
Custom button
matlab.system.display.Action(action)
matlab.system.display.Action(action,Name,Value)
matlab.system.display.Action(action)
specifies a button to display on theMATLAB Systemblock. This button executes a function by launching a System object™ method or invoking any MATLAB®function or code.
A typical button function launches a figure. The launched figure is decoupled from the block dialog box. Changes to the block are not synced to the displayed figure.
You definematlab.system.display.Action
within thegetPropertyGroupsImpl
method in your class definition file. You can define multiple buttons using separate instances ofmatlab.system.display.Action
in your class definition file.
matlab.system.display.Action(action,Name,Value)
includesName,Value
pair arguments, which you can use to specify any properties.
|
Action taken when the user presses the specified button on theMATLAB Systemblock dialog. The action is defined as a function handle or as a MATLAB command. If you define the action as a function handle, the function definition must define two inputs. These inputs are a A |
Specify optional comma-separated pairs ofName,Value
arguments.Name
is the argument name andValue
is the corresponding value.Name
must appear inside quotes. You can specify several name and value pair arguments in any order asName1,Value1,...,NameN,ValueN
.
You specify these properties as part of the input usingName,Value
pair arguments. Optionally, you can define them usingobject.property
syntax.
ActionCalledFcn
— Action to take when the button is pressed. You cannot specify this property using a Name-Value pair argument.
Label
- Text to display on the button. The default value is an empty character vector.
Description
- Text for the button tooltip. The default value is an empty character vector.
Placement
— Character vector indicating where on a separate row in the property group to place the button. Valid values are'first'
,'last'
, or a property name. If you specify a property name, the button is placed above that property. The default value is'last'
.
Alignment
— Character vector indicating how to align the button. Valid values are'left'
and'right'
. The default value is'left'
.
getPropertyGroupsImpl
(Simulink)|matlab.system.display.Section
(Simulink)|matlab.system.display.SectionGroup