Engee documentation

Submatrix

Selecting a subset of elements (submatrices) from the input matrix.

blockType: Submatrix

Path in the library:

/Basic/Matrix Operations/Submatrix

Description

Block Submatrix extracts from the input matrix size on the submatrix .

For more information about selecting rows and columns to extract, see [Task_range parameters].

Ports

Entrance

Port_1 — input matrix
scalar | vector | the matrix

The original matrix.

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

Support for complex numbers: Yes

Output

Port_1 — submatrix
matrix

The submatrix extracted from the input signal. The output data type is the same as the input.

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

Support for complex numbers: Yes

Parameters

Row span — range of pass lines:q[<br>] All rows (default) | One row | Range of rows

The range of input rows that will be stored in the output matrix.

Row — the first (only) row of the output submatrix
First (default) | Index | Offset from last | Last | Offset from middle | Middle

The input string to be used as the first and only string of the output submatrix.

Dependencies

To use this parameter, set the Row span parameter to One row.

Starting row — the first row of the output submatrix
First (default) | Index | Offset from last | Last | Offset from middle | Middle

A method for specifying a row in the source matrix to be used as the first row of the output submatrix.

Dependencies

To use this parameter, set the Row span parameter to `Range of rows'.

Row index — index of the first (only) row of
1 (default) | positive integer

The index of the input string to be used as the first and only row of the output submatrix is set as an integer greater than or equal to one.

Dependencies

To use this parameter, set the Row span parameter to One row and the Row parameter to Index.

Starting row index — index of the first row of
1 (default) | positive integer

The index of the input string to be used as the first row of the output submatrix is set as an integer greater than or equal to one.

Dependencies

To use this parameter, set the Row span parameter to Range of rows and the Starting row parameter to Index.

Row offset — offset of the first (only) row of
1 (default) | integer

The offset of the input string to be used as the first and only row of the output submatrix is set as an integer. The sign of the number determines the direction of the displacement.

Dependencies

To use this parameter, set the Row span parameter to One row and the Row parameter to Offset from last or `Offset from middle'.

Starting row offset — offset of the first row of
1 (default) | integer

The offset of the input string to be used as the first row of the output submatrix is set as an integer. The sign of the number determines the direction of the displacement.

Dependencies

To use this parameter, set the Row span parameter to Range of rows and the Starting row parameter to Offset from last or `Offset from middle'.

Ending row — the last row of the output submatrix
Last (default) | Index | Offset from last | Offset from middle | Middle

A method for specifying a row in the source matrix to be used as the last row of the output submatrix.

Dependencies

To use this parameter, set the Row span parameter to Range of rows and the Starting row parameter to any value other than Last.

Ending row index — index of the last row of
1 (default) | positive integer

The index of the input string to be used as the last row of the output submatrix is set as an integer greater than or equal to one.

Dependencies

To use this parameter, set Ending row to Index.

Ending row offset — offset of the last row of
1 (default) | integer

The offset of the input string to be used as the last row of the output submatrix is set as an integer. The sign of the number determines the direction of the displacement.

Dependencies

To use this parameter, set the Ending row parameter to Offset from middle or `Offset from last'.

Column span — range of input columns
All columns (default) | One column | Range of columns

The range of input columns that will be stored in the output matrix.

Column — the first (only) column of
First (default) | Index | Offset from last | Last | Offset from middle | Middle

The input column to be used as the first and only column of the output submatrix.

Dependencies

To use this parameter, set the Column span parameter to One column.

Starting column — the first column of the output submatrix
First (default) | Index | Offset from last | Last | Offset from middle | Middle

A method for specifying a column in the source matrix to be used as the first column of the output submatrix.

Dependencies

To use this parameter, set the Column span parameter to `Range of columns'.

Starting column index — index of the first column of
1 (default) | positive integer

The index of the input column to be used as the first column of the output submatrix, set as an integer greater than or equal to one.

Dependencies

To use this parameter, set the Column span parameter to Range of columns' and the Starting column parameter to `Index.

Column index — index of the first (only) column of
1 (default) | positive integer

The index of the input column, which will be used as the first and only column of the output submatrix, is set as an integer greater than or equal to one.

Dependencies

To use this parameter, set the Column span parameter to One column and the Column parameter to Index.

Column offset — offset of the first (only) column of
1 (default) | integer

The offset of the input column, which will be used as the first and only column of the output submatrix, is set as an integer. The sign of the number determines the direction of the displacement.

Dependencies

To use this parameter, set the Column span parameter to One column and the Column parameter to Offset from last or `Offset from middle'.

Starting column offset — offset of the first column of
1 (default) | integer

The offset of the input column to be used as the first column of the output submatrix is set as an integer. The sign of the number determines the direction of the displacement.

Dependencies

To use this parameter, set the Column span parameter to Range of columns, and the Starting column parameter to Offset from last or `Offset from middle'.

Ending column — last column of
Last (default) | Index | Offset from last | Offset from middle | Middle

A method for specifying a column in the source matrix to be used as the last column of the output submatrix.

Dependencies

To use this parameter, set the Column span parameter to Range of columns and set the Starting column parameter to any value other than Last.

Ending column index — index of the last column of
1 (default) | positive integer

The index of the input column, which will be used as the last column of the output submatrix, is set as an integer greater than or equal to one.

Dependencies

To use this parameter, set the Ending column parameter to Index.

Ending column offset — offset of the last column of
1 (default) | integer

The offset of the input column to be used as the last column of the output submatrix is set as an integer. The sign of the number determines the direction of the displacement.

Dependencies

To use this parameter, set the Ending column parameter to Offset from middle or `Offset from last'.

More detailed

Range setting parameters

The block accepts an input undirected vector of length M as a matrix M by 1. The Row span parameter provides three options for specifying a range of rows in the input matrix u, which should be stored in the output submatrix y:

  • `All rows' — indicates that the output submatrix y contains all M rows of the input matrix u.

  • One row' — indicates that the output submatrix y contains only one row from the input matrix u. When you select the value `One row, the Row parameter becomes available, allowing you to select the desired row.

  • Range of rows' — indicates that the output submatrix y contains a range of rows from the input matrix u. When you select the value `Range of rows, the Starting row and Ending row options become available for use, which allow you to select the desired row range.

The Column span parameter contains an appropriate set of three options for specifying the range of columns in the input matrix u to be stored in the output submatrix y: All columns, One column, or Range of columns'. Selecting the value `One column includes the parameter Column', and the value `Range of columns includes the parameters Starting column and `Ending column'.

When selecting the value One row or Range of rows' in the Row span parameter, the desired row or row range is specified in the Row, Starting row and Ending row parameters. Similarly, when selecting the values `One column or Range of columns for the Column span parameter, the desired column or range of columns is specified in the Column, Starting column and Ending column parameters.

The values of the Row, Column, Starting row or Starting column parameters can be set in six ways:

  • `First' — for strings defines that the first row of the input matrix u should be used as the first row of the output submatrix y. If it is necessary to include all columns, then this is equivalent to .

    For columns, this means that the first column of the input matrix u should be used as the first column of the output submatrix y. When all lines are included, this is equivalent to .

  • Index — for rows indicates that the first row of the output submatrix y should be the row of the input matrix u, firstrow, indexed by the parameter Row index or the parameter Starting row index. When all columns are included, this is equivalent to .

    For columns, this indicates that the input matrix column u, firstcol indexed by the Column index parameter or the Starting column index parameter, should be used as the first column of the output submatrix y. If it is necessary to include all lines, this is equivalent to .

  • 'Offset from last' — for rows indicates that the first row of the output submatrix y should be the row of the input matrix u, offset relative to row M by the parameter Row offset or Starting row offset, firstrow. If all columns must be included, then this is equivalent to .

    For columns, this parameter specifies that the first column of the output submatrix y should be the column of the input matrix u, offset relative to column N by the parameter Column offset or Starting column offset, `firstcol'. If it is necessary to include all lines, then this is equivalent to .

  • Last — for strings, this indicates that the last row of the input matrix u should be used as the only row of the output submatrix y. If all columns are included in the row, then this is equivalent to .

    For columns, this indicates that the last column of the input matrix u should be used as the only column of the output submatrix y. When all lines are included, this is equivalent to .

  • 'Offset from middle` — when this option is selected, the block selects the first row or column of the output submatrix y by adding the specified offset to the middle row or column of the input matrix u. If the number of input rows or columns X is even, then the block defines the middle as . If the number of input rows or columns is odd, then the block defines the middle as .

    If it is necessary to include all columns, the following code defines the initial row: , where Offset is the value of the Row offset or Starting row offset parameter. If it is necessary to include all rows, then the initial column is defined by the following code: , where Offset is the value of the Column offset or Starting column offset parameter.

  • Middle — when selecting this option, the block uses the middle row or column of the input matrix u as the first row or column of the output submatrix y. If the number of input rows or columns X is even, then the block defines the middle as . If the number of input rows or columns is odd, then the block defines the middle as .

    If it is necessary to include all columns, the following code defines the initial row: . When all rows are included, the initial column is determined by the following code: .

The end row or end column can similarly be set in five ways:

  • Index — for rows indicates that the last row of the output submatrix y should be the row of the input matrix u, indexed forward by the parameter Ending row index lastrow. If it is necessary to include all columns, then this is equivalent to .

    For columns, this indicates that the last column of the output submatrix y should be the column of the input matrix u, indexed forward by the parameter Ending column index, `lastcol'. When all lines are included, this is equivalent to .

  • 'Offset from last' — for rows indicates that the last row of the output submatrix y should be the row of the input matrix u, offset relative to row M by the value of the offset parameter of the end row `lastrow'. When all columns are included, this is equivalent to .

    For columns, this parameter specifies that the last column of the output submatrix y should be the column of the input matrix u, offset relative to column N by the parameter Ending column offset, `lastcol'. When all lines are included, this is equivalent to .

  • 'Last' — for strings defines that the last row of the input matrix u should be used as the last row of the output submatrix y. If all columns must be included, then this is equivalent to .

    For columns, this indicates that the last column of the input matrix u should be used as the last column of the output submatrix y. When all lines must be included, this is equivalent to .

  • 'Offset from middle' — when this option is selected, the block selects the last row or column of the output submatrix y, adding the specified offset to the middle row or column of the input matrix u. If the number of input rows or columns X is even, then the block defines the middle as . If the number of input rows or columns is odd, then the block defines the middle as .

    If you need to include all columns, the following code defines the end row: , where Offset is the value of the Ending row offset parameter. If it is necessary to include all rows, the following code defines the final column: , where Offset is the value of the Ending column offset parameter.

  • Middle — when this option is selected, the block uses the middle row or column of the input matrix u as the last row or column of the output submatrix y. If the number of input rows or columns X is even, then the block defines the middle as . With an odd number of input rows or columns, the block defines the middle as .

    If you need to include all columns, the following code defines the end row: . If all rows are to be included, then the following code defines the final column: .