linalg(deprecated)
subvector
extract a specified vector from a matrix
Calling Sequence
Parameters
Description
Examples
subvector(A, r, c)
A
-
matrix
r, c
list, range, or integer
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.
with⁡linalg:
A≔array⁡1,2,3,4,x,6
A≔1234x6
subvector⁡A,1..2,2
2x
subvector⁡A,2,2,1
x4
See Also
linalg(deprecated)[submatrix]
LinearAlgebra
Download Help Document