linalg(deprecated)/subvector - Maple Help
For the best experience, we recommend viewing online help using Google Chrome or Microsoft Edge.

Home : Support : Online Help : linalg(deprecated)/subvector

linalg(deprecated)

 subvector
 extract a specified vector from a matrix

 Calling Sequence subvector(A, r, c)

Parameters

 A - matrix r, c - list, range, or integer

Description

 • Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[SubVector], instead.
 - For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.
 • The function subvector(A, r, c) returns the vector of A selected by the single index in either the row or column entry and the range or list in the other entry.
 • Note that either the row or column entry must be a single index specifying the desired row or column.
 • The command with(linalg,subvector) allows the use of the abbreviated form of this command.

Examples

Important: The linalg package has been deprecated. Use the superseding command LinearAlgebra[SubVector], instead.

 > $\mathrm{with}\left(\mathrm{linalg}\right):$
 > $A≔\mathrm{array}\left(\left[\left[1,2,3\right],\left[4,x,6\right]\right]\right)$
 ${A}{≔}\left[\begin{array}{ccc}{1}& {2}& {3}\\ {4}& {x}& {6}\end{array}\right]$ (1)
 > $\mathrm{subvector}\left(A,1..2,2\right)$
 $\left[\begin{array}{cc}{2}& {x}\end{array}\right]$ (2)
 > $\mathrm{subvector}\left(A,2,\left[2,1\right]\right)$
 $\left[\begin{array}{cc}{x}& {4}\end{array}\right]$ (3)