set
Class: Simulink.MaskParameter
Namespace: Simulink
Set properties of mask parameters
Description
maskobj.Parameters.set(
sets the properties of a mask parameter.Name,Value
)
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.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'Type','edit'
Type of parameter, specified as character vector.
Data Types: char
| string
The options that are displayed within a popup
or
combobox
or listbox
parameter, specified as a
cell array.
Data Types: cell
The name of the mask parameter, specified as a character vector. This name is assigned to the mask workspace variable created for this parameter.
Data Types: char
| string
Display name for the mask parameter, specified as a character vector. This name appears as the label associated with the parameter on the mask dialog.
Data Types: char
| string
The default value of the mask parameter in the Mask Parameters dialog. Type
specific, depends on the Type
of the parameter, specified as a
character vector.
Data Types: char
| string
Option to evaluate mask parameter, specified as a logical.
Data Types: char
Option to change the mask parameter during simulation, specified as character vector or string. The available options are:
off - you cannot change mask parameter values during simulation in this mode.
on - you can change the mask parameter value during simulation. Each time you make a change the model is compiled.
run-to-run - If the mask parameter is set to run-to-run in Fast Restart mode, the value can be changed between runs. The model is not recompiled to reflect the value in simulation results.
Data Types: char
Option to save the mask parameter value in the model file, specified as a logical.
Data Types: char
Option to hide the mask parameter in the mask dialog, specified as a logical.
Data Types: char
Option to edit the mask parameter in the mask dialog, specified as a logical.
Data Types: char
Option to enable the mask parameter in the mask dialog, specified as a logical.
Data Types: char
Option to show the mask parameter in the mask dialog, specified as a logical.
Data Types: char
Option to enable tooltips for the mask parameter, specified as a logical value.
Data Types: char
Callback code for the mask parameter, specified as a character vector. The callback code executes when a user changes the parameter value in the mask dialog box.
Data Types: char
Alternative name for the mask parameter is specified as character vector.
Data Types: char
| string
Layout options for the parameter in the mask dialog, specified as a character vector or logical value. The location of the parameter in the mask dialog such as the row location, prompt location is specified. Additionally horizontal stretch or shrink of the mask parameter is also specified.
Examples
Get mask as an object using a masked block’s path.
maskobj = Simulink.Mask.get('setmaskparameter/Subsystem');
Get mask parameter
parameters = maskobj.Parameters(1);
Edit mask parameter so it is of type popup, cannot be evaluated.
maskobj.Parameters.set('Type','popup','TypeOptions',... {'Red' 'Blue' 'Green'},'Evaluate','off')
Version History
Introduced in R2006a
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.
웹사이트 선택
번역된 콘텐츠를 보고 지역별 이벤트와 혜택을 살펴보려면 웹사이트를 선택하십시오. 현재 계신 지역에 따라 다음 웹사이트를 권장합니다:
또한 다음 목록에서 웹사이트를 선택하실 수도 있습니다.
사이트 성능 최적화 방법
최고의 사이트 성능을 위해 중국 사이트(중국어 또는 영어)를 선택하십시오. 현재 계신 지역에서는 다른 국가의 MathWorks 사이트 방문이 최적화되지 않았습니다.
미주
- América Latina (Español)
- Canada (English)
- United States (English)
유럽
- 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)