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

Input

# IN_1 — the input matrix
scalar | vector | the matrix

Details

The original matrix.

Data types

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

Complex numbers support

Yes

Output

# OUT_1 — the submatrix
the matrix

Details

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

Complex numbers support

Yes

Parameters

Main

# Row span — row range
All rows | One row | Range of rows

Details

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

Values

All rows | One row | Range of rows

Default value

Range of rows

Program usage name

RowSpan

Tunable

No

Evaluatable

No

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

Details

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

Dependencies

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

Values

First | Index | Offset from last | Last | Offset from middle | Middle

Default value

First

Program usage name

OneRowStartMode

Tunable

No

Evaluatable

No

# Row index — index of the first (only) row
Integer

Details

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 for the parameter Row span meaning One row and for the parameter RowIndex.

Default value

1

Program usage name

OneRowStartIndex

Tunable

No

Evaluatable

Yes

# Row offset — offset of the first (single) row
Integer

Details

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 for the parameter Row span meaning One row and for the parameter Row meaning Offset from last or Offset from middle.

Default value

1

Program usage name

OneRowStartOffset

Tunable

No

Evaluatable

Yes

# Starting row — the first line of the output submatrix
First | Index | Offset from last | Last | Offset from middle | Middle

Details

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 for the parameter Row span meaning Range of rows.

Values

First | Index | Offset from last | Last | Offset from middle | Middle

Default value

First

Program usage name

RowStartMode

Tunable

No

Evaluatable

No

# Starting row index — index of the first row
Integer

Details

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 for the parameter Row span meaning Range of rows and for the parameter Starting rowIndex.

Default value

1

Program usage name

RowStartIndex

Tunable

No

Evaluatable

Yes

# Starting row offset — offset of the first line
Integer

Details

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 for the parameter Row span meaning Range of rows and for the parameter Starting rowOffset from last or Offset from middle.

Default value

1

Program usage name

RowStartOffset

Tunable

No

Evaluatable

Yes

# Ending row — the last line of the output submatrix
Index | Offset from last | Last | Offset from middle | Middle

Details

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 for the parameter Row span meaning Range of rows and for the parameter Starting row any value other than Last.

Values

Index | Offset from last | Last | Offset from middle | Middle

Default value

Last

Program usage name

RowEndMode

Tunable

No

Evaluatable

No

# Ending row index — index of the last row
Integer

Details

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 for the parameter Ending row meaning Index.

Default value

1

Program usage name

RowEndIndex

Tunable

No

Evaluatable

Yes

# Ending row offset — offset of the last line
Integer

Details

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 for the parameter Ending row meaning Offset from middle or Offset from last.

Default value

1

Program usage name

RowEndOffset

Tunable

No

Evaluatable

Yes

# Column span — range of input columns
All columns | One column | Range of columns

Details

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

Values

All columns | One column | Range of columns

Default value

Range of columns

Program usage name

ColSpan

Tunable

No

Evaluatable

No

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

Details

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

Dependencies

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

Values

First | Index | Offset from last | Last | Offset from middle | Middle

Default value

First

Program usage name

OneColStartMode

Tunable

No

Evaluatable

No

# Column index — index of the first (only) column
Integer

Details

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 for the parameter Column span meaning One column and for the parameter Column — value Index.

Default value

1

Program usage name

OneColStartIndex

Tunable

No

Evaluatable

Yes

# Column offset — offset of the first (single) column
Integer

Details

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 for the parameter Column span meaning One column and for the parameter Column meaning Offset from last or Offset from middle.

Default value

1

Program usage name

OneColStartOffset

Tunable

No

Evaluatable

Yes

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

Details

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 for the parameter Column span meaning Range of columns.

Values

First | Index | Offset from last | Last | Offset from middle | Middle

Default value

First

Program usage name

ColStartMode

Tunable

No

Evaluatable

No

# Starting column index — index of the first column
Integer

Details

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 for the parameter Column span meaning Range of columns, and for the parameter Starting column — value Index.

Default value

1

Program usage name

ColStartIndex

Tunable

No

Evaluatable

Yes

# Starting column offset — offset of the first column
Integer

Details

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 for the parameter Column span meaning Range of columns, and for the parameter Starting column — value Offset from last or Offset from middle.

Default value

1

Program usage name

ColStartOffset

Tunable

No

Evaluatable

Yes

# Ending column — the last column
Index | Offset from last | Last | Offset from middle | Middle

Details

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 for the parameter Column span meaning Range of columns and set for the parameter Starting column any value other than Last.

Values

Index | Offset from last | Last | Offset from middle | Middle

Default value

Last

Program usage name

ColEndMode

Tunable

No

Evaluatable

No

# Ending column index — index of the last column
Integer

Details

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 for the parameter Ending column meaning Index.

Default value

1

Program usage name

ColEndIndex

Tunable

No

Evaluatable

Yes

# Ending column offset — offset of the last column
Integer

Details

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 for the parameter Ending column meaning Offset from middle or Offset from last.

Default value

1

Program usage name

ColEndOffset

Tunable

No

Evaluatable

Yes

Additional Info

Range setting parameters

Details

The block accepts an input undirected length vector as a matrix on . Parameter Row span provides three options for setting a range of rows in the input matrix which should be stored in the output submatrix :

  • All rows — indicates that the output submatrix contains everything rows of the input matrix .

  • One row — indicates that the output submatrix contains only one row from the input matrix . When selecting a value One row the parameter becomes available for use Row, which allows you to select the desired row.

  • Range of rows — indicates that the output submatrix contains a range of rows from the input matrix . When selecting a value Range of rows The following parameters become available for use Starting row and Ending row which allow you to select the desired row range.

Parameter Column span contains an appropriate set of three options for specifying a range of columns in the input matrix which should be stored in the output submatrix : All columns, One column, or Range of columns. Choosing a value One column includes the parameter Column, and the value of Range of columns includes parameters Starting column and Ending column.

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

Parameter values Row, Column, Starting row or Starting column They can be set in six ways:

  • First — for rows, determines that the first row of the input matrix is should be used as the first row of the output submatrix. . 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 is should be used as the first column of the output submatrix . When all lines are included, this is equivalent to .

  • Index — for strings, indicates that as the first row of the output submatrix the row of the input matrix must be used , firstrow indexed by the parameter Row index or a parameter Starting row index. When all columns are included, this is equivalent to .

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

  • Offset from last — for strings, indicates that as the first row of the output submatrix the row of the input matrix must be used , offset relative to the row 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 as the first column of the output submatrix The column of the input matrix must be used , offset relative to the column the parameter Column offset or Starting column offset, firstcol. If it is necessary to include all lines, then this is equivalent to .

  • Last — for rows, this indicates that the last row of the input matrix is should be used as the only row of the output submatrix. . 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 is should be used as the only column of the output submatrix. . 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. by adding the specified offset to the middle row or column of the input matrix . If the number of input rows or columns 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 — parameter value Row offset or Starting row offset. If it is necessary to include all rows, then the initial column is defined by the following code: , where Offset — parameter value Column offset or Starting column offset.

  • Middle — when selecting this option, the block uses the middle row or column of the input matrix. as the first row or column of the output submatrix . If the number of input rows or columns 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 strings, indicates that the last row of the output submatrix is the row of the input matrix must be used indexed forward by 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 is The column of the input matrix must be used indexed forward by parameter Ending column index, lastcol. When all lines are included, this is equivalent to .

  • Offset from last — for strings, indicates that the last row of the output submatrix is the row of the input matrix must be used , offset relative to the row 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 is The column of the input matrix must be used , offset relative to the column the parameter Ending column offset, lastcol. When all lines are included, this is equivalent to .

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

    For columns, this indicates that the last column of the input matrix is should be used as the last column of the output submatrix. . 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. by adding the specified offset to the middle row or column of the input matrix . If the number of input rows or columns 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 — parameter value Ending row offset. If it is necessary to include all rows, the following code defines the final column: , where Offset — parameter value Ending column offset.

  • Middle — when selecting this option, the block uses the middle row or column of the input matrix. as the last row or column of the output submatrix . If the number of input rows or columns 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 it is necessary to include all columns, the following code defines the final row: . If all rows are to be included, then the following code defines the final column: .