MxSetBlock
|
Matrix functions |
SYNTAX | MxSetBlock( matrix, startrow, endrow, startcol, endcol, values = 0 ) |
RETURNS | Matrix |
FUNCTION | Sets values in the rectangular block of cells (rows in the range startrow..endrow and columns in the range startcol..endcol inclusive). This allows to fill entire or partial rows, columns and all other kind of rectangular areas in the matrix with user specified data. Row and column numbers are zero based. If values parameter is scalar, all cells in specified block are filled with that value. If values parameter is an array, cells in the block are filled from left to right and from top to bottom with consecutive values taken from that array. If there are more cells in the block than values in the array, the array item counter wraps around to zero and starts taking values from the beginning Note: the function creates new matrix as a result (so source matrix is unaffected unless you do the assignment of the result back to the original variable) |
EXAMPLE | // Example 1: |
SEE ALSO | Matrix() function , MxGetSize() function , MxToString() function |
The MxSetBlock function is used in the following formulas in AFL on-line library:
See updated/extended version on-line.