This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.

Slider Gain

Vary scalar gain using slider

  • Library:
  • Simulink / Math Operations

Description

The Slider Gain block performs a scalar gain that you can modify during simulation. Modify the gain using the slider parameter.

Ports

Input

expand all

The Slider Gain block accepts real or complex-valued scalar, vector, or matrix input. The block supports fixed-point data types. If the input of the Slider Gain block is real and gain is complex, the output is complex.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | fixed point | enumerated

Output

expand all

The Slider Gain block outputs the input multiplied by a constant gain value. When the input to the block is real and gain is complex, the output is complex.

Data Types: single | double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean | fixed point | enumerated

Parameters

expand all

Chose the gain value applied to the input.

Programmatic Use

Block Parameter: gain
Type: character vector
Values: real scalar
Default: '1'

Specify the lower limit of the slider range.

Programmatic Use

Block Parameter: low
Type: character vector
Values: real scalar
Default: '0'

Specify the upper limit of the slider range. The default is 2.

Programmatic Use

Block Parameter: high
Type: character vector
Values: real scalar
Default: '2'

Block Characteristics

Data Types

double | single | Boolean | base integer | fixed point

Direct Feedthrough

No

Multidimensional Signals

Yes

Variable-Size Signals

Yes

Zero-Crossing Detection

No

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

PLC Code Generation
Generate Structured Text code using Simulink® PLC Coder™.

Fixed-Point Conversion
Convert floating-point algorithms to fixed point using Fixed-Point Designer™.

See Also

Introduced before R2006a