function
MathUtilities.lowPass3
Apply a first-order sample blend to a 3-vector
Public declarations
Explicit source declarations; dimensions, modifications and defaults are shown as written, without evaluation.
| Role | Name | Type | Dimensions / attributes / default | Description |
|---|---|---|---|---|
| input | sample | Real | [3] | |
| input | previous | Real | [3] | |
| input | sampleWeight | Real | | |
| output | result | Real | [3] |
Modelica declarations and implementation
Show parameters, interfaces and source
Parameters, inputs, outputs, defaults and equations from the source file.
function lowPass3 "Apply a first-order sample blend to a 3-vector"
input Real sample[3];
input Real previous[3];
input Real sampleWeight;
output Real result[3];
algorithm
result := sampleWeight * sample + (1.0 - sampleWeight) * previous;
annotation(Inline = true);
end lowPass3;