Using Simulink | ![]() ![]() |
Creating Mask Dialog Box Prompts
To create the mask for this subsystem, select the Subsystem block and choose Mask Subsystem from the Edit menu.
This example primarily uses the Mask Editor's Parameters pane to create the masked subsystem's dialog box.
The Mask Editor enables you to specify these attributes of a mask parameter:
Generally, it is convenient to refer to masked parameters by their prompts. In this example, the parameter associated with slope is referred to as the Slope parameter, and the parameter associated with intercept is referred to as the Intercept parameter.
The slope and intercept are defined as edit controls. This means that the user types values into edit fields in the mask dialog box. These values are stored in variables in the mask workspace. Masked blocks can access variables only in the mask workspace. In this example, the value entered for the slope is assigned to the variable m
. The Slope block in the masked subsystem gets the value for the slope parameter from the mask workspace. This figure shows how the slope parameter definitions in the Mask Editor map to the actual mask dialog box parameters.
After you create the mask parameters for slope and intercept, click the OK button. Then double-click the Subsystem block to open the newly constructed dialog box. Enter 3
for the Slope and 2
for the Intercept parameter.
![]() | Masked Subsystem Example | Creating the Block Description and Help Text | ![]() |