Gain

This block implements a gain operation where the output is obtained by multiplying the gain parameter by the input. If the gain parameter is scalar, it is multiplied with every entry of the input to produce the output. If it is a matrix, an element-wise product is performed.

    Gain

Library

Activate/MathOperations

Description

The Gain block implements a gain operation where the output is obtained by multiplying the gain parameter by the input. If the gain parameter is scalar, then it is multiplied with every entry of the input to produce the output.

If it is a matrix, an element-wise product is performed. When input and parameter gain are both matrices, the dimensions should be identical or one must be scalar.

Inputs can be either real or complex.

Inputs are either scalar, vector or matrix.

To perform a matrix multiplication, use the MatrixGain block instead.

Parameters

Gain_0

NameLabelDescriptionData TypeValid Values

gain

Gain

The gain value

Matrix

overflow

Do on overflow

This parameter defines the way overflow shoudl behandled for integer datatype.

String

'Nothing'
'Saturate'
'Error'

externalActivation

External activation

Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected.

Number

0
1

Ports

NameTypeDescriptionIO TypeNumber

Port 1

explicit

input

1

Port 2

explicit

output

1

Port 3

activation

input

externalActivation

Advanced Properties

NameValueDescription

always active

no

direct-feedthrough

yes

Yes. Unless the norm value of the gain is zero

zero-crossing

no

mode

no

continuous-time state

no

discrete-time state

no

See Also