MatrixExtractor
Select elements of an input matrix.
Library
Activate/MatrixOperations
Description
Select elements of input matrix by specifying the index of first and second dimensions. The index can be specified as block parameter or externally fed with an optional input.
Parameters
Name | Label | Description | Data Type | Valid Values |
---|---|---|---|---|
extractx | Index vector I | Structure | ||
extractx/x_selectall | : (all) | Select all rows. | Number | 0 |
extractx/x_vectorindex | Defined as parameter | Select rows by specified indices. | Number | 0 |
extractx/x_startingindex | i=I(1) defined as parameter | Select rows by specified starting index and output size. | Number | 0 |
extractx/x_startingindexdecreasing | i=I(1) defined as parameter (decreasing) | Select rows specified by the ending index and output size. | Number | 0 |
extractx/x_vectorindexport | Defined by input | Select rows by the indices provided externally. | Number | 0 |
extractx/x_startingindexport | i=I(1) defined by input | Select rows from starting index provided externally and output size. | Number | 0 |
extractx/x_startingindexportdecreasing | i=I(1) defined by input (decreasing) | Select rows specified by the ending index provided externally and output size. | Number | 0 |
x_vector_index | Index parameter | Structure | ||
x_vector_index/x_vi | Index vector I parameter | Indices of selected rows. | Cell of vectors | |
x_starting_index | Index parameter | Structure | ||
x_starting_index/x_si | i=I(1) parameter | The index of starting row. | Cell of vectors of size 1 | |
x_starting_index/x_osz | Output size | The number of rows of output (number of indices to be selected). | Cell of numbers | |
x_starting_indexdecreasing | Index parameter | Structure | ||
x_starting_indexdecreasing/x_si | i=I(1) parameter | Ending index. | Cell of vectors of size 1 | |
x_starting_indexdecreasing/x_osz | Output size | The number of rows of output (number of indices to be selected). | Cell of numbers | |
x_starting_index_port | Index parameter | Structure | ||
x_starting_index_port/x_osz | Output size | The number of rows of output (number of indices to be selected). | Cell of vectors of size 1 | |
x_starting_index_portdecreasing | Index parameter | Structure | ||
x_starting_index_portdecreasing/x_osz | Output size | The number of rows of output (number of indices to be selected). | Cell of vectors of size 1 | |
extracty | Index vector J | Structure | ||
extracty/y_selectall | : (all) | Select all columns. | Number | 0 |
extracty/y_vectorindex | Defined as parameter | Select columns by specified indices. | Number | 0 |
extracty/y_startingindex | j=J(1) defined as parameter | Select columns by specified starting index and output size. | Number | 0 |
extracty/y_startingindexdecreasing | j=J(1) defined as parameter (decreasing) | Select columns specified by the ending index and output size. | Number | 0 |
extracty/y_vectorindexport | Defined by input | Select columns by the indices provided externally. | Number | 0 |
extracty/y_startingindexport | j=J(1) defined by input | Select columns from starting index provided externally and output size. | Number | 0 |
extracty/y_startingindexportdecreasing | j=J(1) defined by input (decreasing) | Select columns specified by the ending index provided externally and output size. | Number | 0 |
y_vector_index | Index parameter | Structure | ||
y_vector_index/y_vi | Index vector J parameter | Indices of selected columns. | Cell of vectors | |
y_starting_index | Index parameter | Structure | ||
y_starting_index/y_si | j=J(1) parameter | The index of starting column. | Cell of vectors of size 1 | |
y_starting_index/y_osz | Output size | Cell of numbers | ||
y_starting_indexdecreasing | Index parameter | Structure | ||
y_starting_indexdecreasing/y_si | j=J(1) parameter | Ending index | Cell of vectors of size 1 | |
y_starting_indexdecreasing/y_osz | Output size | The number of columns of output (number of indices to be selected). | Cell of numbers | |
y_starting_index_port | Index parameter | Structure | ||
y_starting_index_port/y_osz | Output size | The number of columns of output (number of indices to be selected). | Cell of vectors of size 1 | |
y_starting_index_portdecreasing | Index parameter | Structure | ||
y_starting_index_portdecreasing/y_osz | Output size | The number of columns of output (number of indices to be selected). | Cell of vectors of size 1 | |
onebased | One-based indexing | To index a matrix, start from one when checked, start from zero when unchecked. | Number | 0 |
externalActivation | External activation | Specifies whether the block receives an external activation or inherits its activation through its regular input ports. When External Activation is selected, an additional activation port is added to the block. By default, external activation is not selected. | Number | 0 |
Ports
Name | Type | Description | IO Type | Number |
---|---|---|---|---|
U | explicit | input | 1 | |
Port 2 | explicit | input | (1-extractx.x_selectall)*(1-extractx.x_vectorindex)*(1-extractx.x_startingindex)*(1-extractx.x_startingindexdecreasing)+(1-extracty.y_selectall)*(1-extracty.y_vectorindex)*(1-extracty.y_startingindex)*(1-extracty.y_startingindexdecreasing) | |
Y | explicit | output | 1 | |
Port 4 | activation | input | externalActivation |
Advanced Properties
Name | Value | Description |
---|---|---|
always active | no | |
direct-feedthrough | yes | |
zero-crossing | no | |
mode | no | |
continuous-time state | no | |
discrete-time state | no |