get_sub_matrix
— Get a sub-matrix of a matrix.
get_sub_matrix( : : MatrixID, Row, Column, RowsSub, ColumnsSub : MatrixSubID)
The operator get_sub_matrix
generates a new matrix
MatrixSub
and copies to this matrix a part of the input
Matrix
defined by the matrix handle MatrixID
.
The part of the Matrix
is determined by the upper left
corner (Row
,Column
) and the sub-matrix dimensions
(RowsSub
, ColumnsSub
). The operator returns the
matrix handle MatrixSubID
of the matrix
MatrixSub
. Access to the elements of the matrix is
possible e.g., with the operator get_full_matrix
.
Example:
Row
= 0,
Column
= 1,
RowsSub
= 3,
ColumnsSub
= 2
The conditions 0 Row
< size of
Matrix
in row direction, Row
+ RowsSub
size of Matrix
in the row direction, 0
Column
< size of Matrix
in the
column direction, and Column
+ ColumnsSub
size of matrix Matrix
in the column
direction must be satisfied.
MatrixID
(input_control) matrix →
(handle)
Matrix handle of the input matrix.
Row
(input_control) integer →
(integer)
Upper row position of the sub-matrix in the input matrix.
Default: 0
Suggested values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100
Restriction:
Row >= 0
Column
(input_control) integer →
(integer)
Left column position of the sub-matrix in the input matrix.
Default: 0
Suggested values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100
Restriction:
Column >= 0
RowsSub
(input_control) integer →
(integer)
Number of rows of the sub-matrix.
Default: 1
Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100
Restriction:
RowsSub >= 1
ColumnsSub
(input_control) integer →
(integer)
Number of columns of the sub-matrix.
Default: 1
Suggested values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100
Restriction:
ColumnsSub >= 1
MatrixSubID
(output_control) matrix →
(handle)
Matrix handle of the sub-matrix.
If the parameters are valid, the operator get_sub_matrix
returns the value 2 (
H_MSG_TRUE)
. If necessary, an exception is raised.
get_full_matrix
,
get_value_matrix
Foundation