blockArithmeticMean
(Weighted) arithmetic mean
Extends from Interfaces.PartialConverters.MISO (Converter with multiple inputs and a single output).
Information
This information is part of the Business Simulation Library (BSL). Please support this work and ► donate.
The scalar output y is obtained as a convex combination of the components of the input vector u:
Notes
- If
useWeights = falsethen all weights are assumed to be one. - Weights will be normalized to add up to one; negative weights will be set to zero.
See also
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Real | weights | ones(nin) | Weights to be used for inputs |
| Structural Parameters | |||
| Integer | nin (from MISO) | 2 | Number of input signals |
| Boolean | useWeights | false | = true, if the output is to be a weighted arithmetic mean |
| Boolean | hasConstantWeights | true | = true, if the weights are constant |
Connectors
| Type | Name | Default | Description |
|---|---|---|---|
| Connectors.RealMultiInput[nin] | u (from MISO) | Input | |
| Interfaces.Connectors.RealMultiInput[nin] | u_weights | Input of weights |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| RealOutput | y (from SO) |