Simulink Reference | ![]() ![]() |
Vary a scalar gain using a slider
Library
Description
The Slider Gain block allows you to vary a scalar gain during a simulation using a slider. The block accepts one input and generates one output.
Data Type Support
Data type support for the Slider Gain block is the same as that for the Gain block (see Gain, Matrix Gain
).
Dialog Box
0
.2
.The edit fields indicate (from left to right) the lower limit, the current value, and the upper limit. You can change the gain in two ways: by manipulating the slider, or by entering a new value in the current value field. You can change the range of gain values by changing the lower and upper limits. Close the dialog box by clicking the Close button.
If you click the slider's left or right arrow, the current value changes by about 1% of the slider's range. If you click the rectangular area to either side of the slider's indicator, the current value changes by about 10% of the slider's range.
To apply a vector or matrix gain to the block input, consider using the Gain block.
Characteristics
Direct Feedthrough |
Yes |
Sample Time |
Inherited from driving block |
Scalar Expansion |
Of the gain |
States |
0 |
Dimensionalized |
Yes |
Zero Crossing |
No |
![]() | Sine Wave | State-Space | ![]() |