extract a specified submatrix from a matrix
submatrix(A, Rrange, Crange)
submatrix(A, Rlist, Clist)
integer ranges of rows/columns of A
lists of integer row/column indices
Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[SubMatrix], instead.
- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
The call submatrix(A, Rrange, Crange) returns the submatrix of A selected by the row range Rrange and the column range Crange.
The call submatrix(A, Rlist, Clist) returns the matrix whose (i,j)th element is A[Rlist[i], Clist[j]].
These calling methods can be combined, so for instance the call submatrix(A, Rlist, Crange) is valid, and will return the submatrix of A with rows from Rlist and columns from Crange.
The command with(linalg,submatrix) allows the use of the abbreviated form of this command.
A ≔ array⁡1,2,3,4,x,6
A ≔ 1234x6
Download Help Document
What kind of issue would you like to report? (Optional)
Thank you for submitting feedback on this help document. Your feedback will be used
to improve Maple's help in the future.