Category of matrices
MuPAD® notebooks are not recommended. Use MATLAB® live scripts instead.
MATLAB live scripts support most MuPAD functionality, though there are some differences. For more information, see Convert MuPAD Notebooks to MATLAB Live Scripts.
Cat::Matrix(R) represents the category of
matrices over the rng
Cat::Matrix(R) is a matrix of arbitrary
dimension over a component ring
In the following description of the methods, we use the following
notations for a matrix A from
a domain of category
nrows(A) denotes the number of rows and ncols(A) the number of columns of A.
Further on, a row index is an integer ranges from 1 to nrows(A), and a column index is an integer ranges from 1 to ncols(A).
A domain which must be from the category
is set to
_index— Matrix indexing
matdim— Matrix dimension
new— Matrix definition
Of course, this method may implement further possibilites to
create matrices (for example, see the method
the domain constructor
set_index— Setting matrix components
_negate— Negate a matrix
_plus— Add matrices
The matrices must be of the same domain type, otherwise
_subtract— Subtract two matrices
equal— Test on equality of matrices
identity— Identity matrix
It only exists if
R is of category
Cat::Ring, i.e., a ring with
iszero— Test on zero matrices
Note that there may be more than one representation of the zero
matrix of a given dimension if
R does not have
transpose— Transpose of a matrix
col— Extracting columns
concatMatrix— Horizontal concatenation of matrices
An error message is issued if the two matrices do not have the same number of rows.
delCol— Deleting columns
A only consists of one column then
delRow— Deleting rows
A only consists of one row then
row— Extracting rows
setCol— Replacing columns
setRow— Replacing rows
stackMatrix— Appending of matrices vertically
An error message is issued if the two matrices do not have the same number of columns.
swapCol— Swapping matrix columns
swapRow— Swapping matrix rows