Create a constant matrix
stm_constant.Rd
stm_constant()
creates a matrix of a specified size where all
elements are the same constant value. If no constant value is provided,
one is randomly selected from the range -5 to 9.
Arguments
- k
The constant value to fill the matrix. If
NULL
, a random value is selected from the range -5 to 9.- nrows
The number of rows in the matrix. Must be at least 1.
- ncols
The number of columns in the matrix. Must be at least 1.
- digits
Optional. The number of decimal places to round the matrix values. Default is
NULL
.