Engee documentation

Mux

Combine the inputs of the same data type into a vector.

blockType: Mux

Path in the library:

/Basic/Signal Routing/Mux

Description

Block Mux combines real or complex inputs with the same type into a vector. Multiple blocks can be used Mux to create a vector signal step by step, but the result will be the same as if you used a single block.

Ports

Input

Port_1 — input signal for inclusion in the output signal
scalar | vector

The input signal to be included in the output signal is a scalar or vector.

Input signals for the block Mux They can be any combination of scalars and vectors, but they must have the same data type and be real or complex.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed-point

Support for complex numbers: Yes

Port_n — input signal for inclusion in the output signal
scalar | vector

The input signal to be included in the output signal is a scalar or vector.

Input signals for the block Mux They can be any combination of scalars and vectors, but they must have the same data type and be real or complex.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed-point

Support for complex numbers: Yes

Output

Port_1 — output signal of the block Mux
vector

Block output signal Mux composed of combined input signals; vector.

The order of the elements of the output signal of the multiplexer is determined by the order of the ports of the input signals.

Data types: Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Bool, Fixed-point

Support for complex numbers: Yes

Parameters

Number of inputs — number of input signals
2 (By default) | scalar | vector

Number and dimension of input signals. An integer scalar or vector.

If the parameter is set as a scalar:

  • If a value greater than 1 is specified, the block will have the appropriate number of input ports. Each input port expects a signal of the same dimension (scalar or vector).

  • If a value of 1 is specified, then the block will have only one input port, and its output signal will always be scalar, directly transmitting the value from this single Input.

If the parameter is set by a vector:

  • The number of input ports of the block is equal to the length of the specified vector.

  • The dimension of the signal at each input port is set by the corresponding element of this vector:

    • Positive integer — a vector of signals of the specified length is expected at this Input.

    • -1 — a signal of any dimension (scalar or vector of any length) is allowed at this Input.

Usage in program code

Block parameter

Inputs

Values

scalar | matrix

By default

2

Additional options

C code generation: Yes