Engee documentation

Multiport Selector

Allocator of arbitrary subsets of input rows or columns across multiple output ports.

blockType: Multiport Selector

Path in the library:

/Signal Operations/Signal Management/Indexing/Multiport Selector

Description

Block Multiport Selector extracts multiple subsets of rows or columns from the input matrix size on and distributes each new submatrix to a separate output port. For more information, see description of parameters Select and Indices to output.

Ports

Input

# IN_1 — Input signal
scalar | vector | the matrix

Details

Input signal , given as a scalar, is a vector of length or a matrix of size on .

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Boolean, Fixed

Complex numbers support

Yes

Output

# OUT_N — subsets of rows or columns of input data
scalar | vector | the matrix

Details

Subsets of rows or columns of the input signal transmitted to each output port. Each cell in the array Indices to output defines the subset of rows or columns of the input signal that will be transmitted to the corresponding output port.

Total number of cells in the array Indices to output specifies the number of output ports in the block.

Data types

Float16, Float32, Float64, Int8, Int16, Int32, Int64, Int128, UInt8, UInt16, UInt32, UInt64, UInt128, Boolean, Fixed

Complex numbers support

Yes

Parameters

Main

# Select — the dimension of the input
Rows | Columns

Details

Select the input dimension:

  • Rows — The block uses the specified indexes to select the rows of the matrix, and all the elements in the selected rows are included.

  • Columns — The block uses the specified indexes to select the columns of the matrix, and all the elements in the selected columns are included.

The selected input row or column can appear any number of times in any of the outputs or not at all.

If the index refers to a non-existent row or column of the input, the block reacts with the action specified in the parameter Invalid index.

Values

Rows | Columns

Default value

Rows

Program usage name

rowsOrCols

Tunable

No

Evaluatable

No

# Indices to output — indexes for output

Details

Specify sets of rows or columns to be distributed to each of the output ports as an array of cells.

Cell contains a one-dimensional indexing expression indicating the subset of input rows or columns to be passed to -th output port. The total number of cells in the array determines the number of output ports in the block.

Example: (4, [1:2; 5], [7; 8], 10:-1:6)

This is an array of four cells that requires the unit to generate four independent outputs (each to a separate port). The table shows the dimensions of these outputs when for the parameter Select value selected Rows, and the dimension of the input on .

Cell Expression Description Output signal dimension

1

4

Line 4 of the input data

on

2

[1:2; 5]

Lines 1, 2, and 5 of the input data

on

3

[7;8]

Lines 7 and 8 of the input data

on

4

10:-1:6

Lines 10, 9, 8, 7 and 6 of the input data

on

Default value

(4, [1:2; 5], [7; 8], 10:-1:6)

Program usage name

idxCellArray

Tunable

No

Evaluatable

Yes

# Invalid index — action in case of incorrect index
Clip index | Generate error

Details

Specify the action to be taken if there is an invalid index value. You can choose one of the following options:

  • Clip index — the block reduces the index to the nearest acceptable value and does not issue a warning.

    For example, if the block receives a matrix as input 64 on 4 and for the parameter Select the value is specified Rows, then the block truncates the index from 72 before 64. For the same input, if for the parameter Select the value is specified Columns, the block truncates the index from 72 before 4. In both cases, the block cuts the index from -2 before 1.

  • Generate error — The block displays an error dialog box and ends the simulation.

Values

Clip index | Generate error

Default value

Clip index

Program usage name

idxErrMode

Tunable

No

Evaluatable

No