Quantcast

Documentation Center

  • Trial Software
  • Product Updates

Contents

linalg::row

Extract rows of a matrix

Use only in the MuPAD Notebook Interface.

This functionality does not run in MATLAB.

Syntax

linalg::row(A, r)
linalg::row(A, r1 .. r2)
linalg::row(A, list)

Description

linalg::row(A, r) extracts the r-th row vector of the matrix A.

linalg::row(A, r1.. r2) returns a list of row vectors whose indices are in the range r1.. r2. If r2< r1 then the empty list [] is returned.

linalg::row(A, list) returns a list of row vectors whose indices are contained in list (in the same order).

Examples

Example 1

We define a matrix over :

A := Dom::Matrix(Dom::Rational)( 
  [[1, 1/5], [-3/2, 5], [2, -3]] 
)

and illustrate the three different input formats for the function linalg::row:

linalg::row(A, 2)

linalg::row(A, [2, 1, 3])

linalg::row(A, 2..3)

Parameters

A

An m×n matrix of a domain of category Cat::Matrix

r

The row index: a positive integer less or equal to m

r1 .. r2

A range of row indices (positive integers less or equal to m)

list

A list of row indices (positive integers less or equal to m)

Return Values

Single row vector or a list of row vectors; a row vector is a 1×n matrix of category Cat::Matrix(R), where R is the component ring of A.

See Also

MuPAD Functions

Was this topic helpful?