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

Online Help

All Products    Maple    MapleSim


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

linalg(deprecated)

  

swaprow

  

swap two rows in a matrix

  

swapcol

  

swap two columns in a matrix

 

Calling Sequence

Parameters

Description

Examples

Calling Sequence

swaprow(A, r1, r2)

swapcol(A, c1, c2)

Parameters

A

-

matrix

r1, r2, c1, c2

-

positive integers

Description

• 

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

  

- For information on migrating linalg code to the new packages, see examples/LinearAlgebraMigration.

• 

The swaprow(A, r1, r2) function creates a new matrix in which row r1 has been swapped with row r2.  Similarly, swapcol(A, c1, c2) creates a new matrix in which column c1 has been swapped with column c2.

  

These functions are part of the linalg package, and so can be used in the form swaprow(..) only after performing the command with(linalg) or with(linalg, swaprow).  They can always be accessed in the long form linalg[swaprow](..).

Examples

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

withlinalg:

Aarray1,2,x,3,4,y

A12x34y

(1)

swaprowA,1,2

34y12x

(2)

swapcolA,2,3

1x23y4

(3)

See Also

LinearAlgebra