| Simulink® | ![]() |
| On this page… |
|---|
You use the model editor to mask Subsystem, Model, and S-function blocks, and the set_param command to mask built-in blocks.
Note The Simulink® product does not support masking port block, e.g., Inport, Outport, Trigger, etc., used in a library. |
Note Ensure that the mask parameter names differ from existing block parameter names. You cannot use built-in block parameter names, such as name, as mask parameter names. Doing so will result in an error message being displayed. |
To mask a Subsystem:
Select Mask Subsystem from the model editor's Edit menu or from the block's context menu. (Right-click the subsystem block to display its context menu.)
The Mask Editor appears.
![]()
See Mask Editor for a detailed description of the Mask Editor.
Use the Mask Editor's tabbed panes to perform any of the following tasks.
Create a custom icon for the masked subsystem (see Icon Pane).
Create parameters that allow a user to set subsystem options (see Mask Editor).
Initialize the masked subsystem's parameters
Create online user documentation for the subsystem
Click Apply to apply the mask to the subsystem or OK to apply the mask and dismiss the Mask Editor.
You can reduce the size of your model by directly masking built-in blocks instead of placing them inside a subsystem. To mask a built-in block:
Select the block in the model.
Type the following command at the MATLAB® command prompt:
set_param(gcb,'Mask','on')
Select Edit Mask from the model editor's Edit menu or from the block's context menu. (Right-click the block to display its context menu.) The Mask Editor appears. See Mask Editor for a detailed description of the Mask Editor.
Use the Mask Editor's tabbed panes to perform any of the following tasks.
Create a custom icon for the masked block (see Icon Pane).
Create a custom mask parameter dialog box for the block (see Parameters Pane).
Initialize the masked block's workspace
Create online user documentation for the block
Click Apply to apply the mask to the block or OK to apply the mask and dismiss the Mask Editor.
![]() | Masked Subsystem Example | Mask Editor | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |