Learn R Programming

polyMatrix (version 0.3.1)

pMbas: Bastion elements of a polynomial matrix

Description

Elements of a matrix or polyMatrix object, from non-beating positions for bastion in the matrix as a chess board.

Usage

pMbas(pm, ki, byrow)

Arguments

pm

a polynomial matrix object

ki

a permutation of the column numbers

byrow

logical. If FALSE (the default) the elments of ki are column indexes, if TRUE these are row indexes.

Value

A list of polynomial class bastion elements of the given polyMatrix determined by the given permutation ki. in a pVector object

Details

Usual

See Also

pMdet

Examples

Run this code
# NOT RUN {
A<-polyMgen.a()
class(A)#  "polyMarray" "polyMatrix"
dim(A)# 2 x 3
A
pMbas(A,c(2,3),byrow=TRUE) # the [1,2] and [2,3] elements
pMbas(A,c(2,2,1),byrow=FALSE) # the [2,1], [2,2]  and [1,3] elements
pMbas(A,c(2,2),byrow=FALSE) # the [2,1] and [2,2] elements
# pMbas(A,c(2,2,1),byrow=TRUE) # Error: Index vector too long!

A<-polyMgen.d(3,3,
     rawData=ch2pn(c("1","0","-1",
                    "2","1","-1",
                    "0","1","1")),byrow=TRUE)
A
pMbas(A,c(2,3,1),byrow=TRUE) # the [1,2], [2,3]  and [3,1] elements
pMbas(A,c(2,3,1),byrow=FALSE) # the [2,1], [3,2]  and [1,3] elements

# clean up
# rm(A)
# }

Run the code above in your browser using DataLab