Polybench® for biosignals / reference 1.34.1
Copies input S1 to the output, if the Gate input is pseudo-true (around 1), or copies input S2 to the output if the Gate input is pseudo-false (around 0).

Gate

Overview

The Gate is an input channel selector: the output is either copied from the first input (S1), or from the second input (S2). The Gate input determines which input is copied; a pseudo-true value at the gate copies S1, a pseudo-false copies S2.

If the Gate and both signal inputs each have the same amount of channels, then each channel can be switched seperately (this is a fundamental difference from the Switch Converge operator ("Switch Converge")).

Operator ports

Input S1: Floating point values

Input S2: Floating point values

Input Gate: Floating point values

Output S1|S2: Floating point values

Properties

Find more information about changing properties here: "Properties Viewer"

Caption
type: Word or phrase
The name of the object in the project. This name must not contain '.', '$' nor '@' characters.

For more information about the rules and usage of the Caption property, please refer to "Caption property - background and usage".

Documentation
type: See description
Optional documentation of this object. If this object is an operator, the Documentation text is displayed below the operator symbol.

Details

In order to function correctly, both inputs S1 and S2 must have equal channel configurations.

The Gate input can function either channel-to-channel, or as scalar. In the first case, each channel switches the gate of the corresponding channel in the input bus. In the seconds case, the Gate is connected to only one input channel, which switches all channels from S1 and S2 at the same time.

Output channel names and units are copied from the S1 input after first connection of the component.

Inputs S1 and S2 may be connected to a feedback channel bus, but note that the input that comes from a feedback loop is delayed one sample period.

Read more about pseudo-boolean states (pseudo-true and pseudo-false) here: "Pseudo-booleans and triggers".

Examples

Example: Gate Feedback Demo
Demonstrates the Gate operator in feedback. The result of this demo is not any valid signal processing algorithm, but merely shows the Gate in action as advanced signal filter.
Examples\DF0204027_001_GateLoop_Demo.xmc