LinearAlgebra
SubMatrix
construct a submatrix of a Matrix
SubVector
construct a subvector of a Vector
Calling Sequence
Parameters
Description
Examples
SubMatrix(A, r, c, options)
SubVector(V, i, options)
A
-
Matrix
r
integer, range with integer endpoints, or list of integers and/or ranges with integer endpoints; the indices of the Matrix rows used to construct the submatrix
c
integer, range with integer endpoints, or list of integers and/or ranges with integer endpoints; the indices of the Matrix columns used to construct the submatrix
V
Vector
i
integer, range with integer endpoints, or list of integers and/or ranges with integer endpoints; the indices of the Vector elements used to construct the subvector
options
(optional); constructor options for the result object
The SubMatrix(A, r, c) function returns a Matrix created by using the entries of A that are in the intersection of the rows and columns specified by r and c. For more information regarding parameters r and c, see Matrix and Vector Entry Selection.
The SubVector(V, i) function returns a Vector created by using the entries of V that are specified by i. The orientation of the resulting subvector is the same as the orientation of V. For more information regarding parameter i, see Matrix and Vector Entry Selection.
The constructor options provide additional information (readonly, shape, storage, order, datatype, and attributes) to the Matrix or Vector constructor that builds the result. These options may also be provided in the form outputoptions=[...], where [...] represents a Maple list. If a constructor option is provided in both the calling sequence directly and in an outputoptions option, the latter takes precedence (regardless of the order).
This function is part of the LinearAlgebra package, and so it can be used in the form SubMatrix(..) only after executing the command with(LinearAlgebra). However, it can always be accessed through the long form of the command by using LinearAlgebra[SubMatrix](..).
with⁡LinearAlgebra:
A≔Matrix⁡3,4,1,2,3,4,5,6,7,8,9,0,1,2
A≔123456789012
SubMatrix⁡A,−1,1,2..4,3
01212343
V≔Vectorrow⁡1,2,3,4,5,6
V≔123456
SubVector⁡V,2,4..−1,1
24561
SubVector⁡V,3
3
See Also
LinearAlgebra[Column]
LinearAlgebra[Minor]
LinearAlgebra[Row]
MVextract
MVselect
Download Help Document