Multiport Selector
Allocator of arbitrary subsets of input rows or columns across multiple output ports.
blockType: Multiport Selector
Path in the library:
|
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 the Select and Indexes to output parameters.
Ports
Entrance
Input — input signal
scalar
| vector
| the matrix
The input signal . It can be a scalar, 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-point
, Enumerated
Support for complex numbers: Yes
Output
Output(s) — subsets of rows or columns of input data
scalar
| vector
| the matrix
Subsets of rows or columns of the input signal transmitted to each output port. Each cell in the Indexes to output array defines a subset of rows or columns of the input signal that will be transmitted to the corresponding output port.
The total number of cells in the Indexes to output array determines 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-point
, Enumerated
Parameters
Select — dimension of the pass input:q[<br>]Rows (default)
| Columns
Select the input dimension:
-
Rows
— The block uses the one-dimensional indexes you specified to select the rows of the matrix, and all the elements in the selected rows are included. -
Columns
— The block uses the one-dimensional indexes you specified 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 entry row or column, the block responds with the action that you specified using the Invalid index parameter.
Indexes to output — indexes to output
(4, [1:2; 5], [7; 8], 10:-1:6) (default)
| tuple of cells
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 following table shows the dimensions of these outputs when Select=`Rows', and the dimension of the input on .
Cell | Expression | Description | Output signal dimension |
---|---|---|---|
1 |
|
Line 4 of the input data |
on |
2 |
|
Lines 1, 2, and 5 of the input data |
on |
3 |
|
Lines 7 and 8 of the input data |
on |
4 |
|
Lines 10, 9, 8, 7 and 6 of the input data |
on |
Invalid index — action in case of invalid index Clip Index (default)
| Generate Error
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 an input of 64
by 4
and Select=Rows
, then the block truncates the index from 72
to 64
. For the same input, if Select=Columns', the block cuts the index from `72
to 4
. In both cases, the block cuts the index from -2
to 1
.
-
`Generate error' — the block displays an error dialog box and ends the simulation.