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.
Library
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
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
gain | Gain | The gain value | Matrix | |
overflow | Do on overflow | This parameter defines the way overflow shoudl behandled for integer datatype. | String | 'Nothing' |
externalActivation | External activation | This parameter defines if the block receives an external activation or inherits. When External Activation is used, a additional activation port is added to the block. default is OFF. | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
Port 1 | explicit | input | 1 | |
Port 2 | explicit | output | 1 | |
Port 3 | activation | input | externalActivation |
Advanced Properties
Name | Value | Description |
---|---|---|
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 |