This example shows how to create a block mask and define its parameters.
|On this page…|
open_system([docroot '/toolbox/simulink/ug/examples/masking.. /subsystem_example'])
This model contains a Subsystem block that models the equation for a line: y = mx + b.
Double-click the subsystem block to open it.
Notice that this subsystem contains the following blocks that are controlled by parameters.
Gain block, named Slope
Constant block, named Intercept
Return to the top-level model, right-click the subsystem block, and select Mask > Create Mask.
The Mask Editor appears.
Define parameters to control the underlying blocks.
In the Mask Editor, click the Parameters & Dialog tab.
Click the Edit parameter icon and add two rows.
In the rows that appear, specify the parameters as follows.