Mux
The Mux block combines its inputs into one array, element by element.
Behavior
Section titled “Behavior”y = [u0, u1, u2]
| Port | Direction | Type |
|---|---|---|
| 0 … N−1 | Input | The array’s element type, f64 by default |
| 0 | Output | The array type, [f64; 3] by default |
There is one input per element, so the port count follows the type.
Parameters
Section titled “Parameters”| Name | Type | Default | Meaning |
|---|---|---|---|
Type |
array type | [f64; 3] |
The array the block builds |
Changing Type to a different length resets the inputs, since each one is an element. Setting it to
[f32; 3] builds an f32 vector, and the blocks it feeds follow the new type.
Example
Section titled “Example”For inputs 1.0, 2.0 and 3.0, the output is y = [1.0, 2.0, 3.0]. An unwired input reads
0.0.
To split an array back into scalars, use one Index block per element.