Operators |
set_sub_matrix — Set a sub-matrix of a matrix.
set_sub_matrix( : : MatrixID, MatrixSubID, Row, Column : )
The operator set_sub_matrix overwrites a part of the Matrix with the matrix MatrixSub . The input matrices are defined by the matrix handles MatrixID and MatrixSubID. The parameters Row and Column determine the position of the upper left corner of the sub-matrix MatrixSub in Matrix .
Example:
/ 3.0 0.0 9.0 1.0 \ / 1.0 -2.0 \ Matrix = | -5.0 3.0 1.0 6.0 | MatrixSub = | 7.0 2.0 | \ -9.0 0.0 1.0 -1.0 / \ -4.0 1.0 / Row = 0 Column = 1 / 3.0 1.0 -2.0 1.0 \ -> Matrix = | -5.0 7.0 2.0 6.0 | \ -9.0 -4.0 1.0 -1.0 /
set_sub_matrix modifies the content of an already existing matrix.
The conditions 0 <= Row < size of matrix Matrix in the row direction, Row + size of matrix MatrixSub in the row direction <= size of matrix Matrix in the row direction, 0 <= Column < size of Matrix in the column direction, and Column + size of matrix MatrixSub in the columns direction <= size of Matrix in the column direction must be satisfied.
Matrix handle of the input matrix.
Matrix handle of the input sub-matrix.
Upper row position of the sub-matrix in the matrix.
Default value: 0
Suggested values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100
Restriction: Row >= 0
Left column position of the sub-matrix in the matrix.
Default value: 0
Suggested values: 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 15, 20, 30, 50, 100
Restriction: Column >= 0
If the parameters are valid, the operator set_sub_matrix returns the value 2 (H_MSG_TRUE). If necessary, an exception is raised.
get_full_matrix, get_value_matrix
Foundation
Operators |