Learn R Programming

polyMatrix (version 0.3.1)

set.polyMatrix: Overwrite a subpart of a polynomial matrix

Description

Returns a polynomial matrix in which the given element are changed to the new given elements.

Usage

# S3 method for polyMatrix
set(pm,i,j,m,byrow=FALSE)

Arguments

pm

a polyMatrix class object

i

the vector of row

j

the vector of column indexes

m

the list of polynomial class new elements

byrow

logical. If FALSE (the default) the m used by columns, otherwise by rows

Value

A polynomial matrix with the over written elements.

See Also

lead

Examples

Run this code
# NOT RUN {
pM <- polyMgen.d(3,3,rawData=
   ch2pn(c("-3+x^3","2+4*x","x^2","1","2","3+x","2*x","0","2-3*x")))
pM

set(pM,1:2,1:2,ch2pn(c("3","4","x","x^2")))

# clean up
# rm(pM)
# }

Run the code above in your browser using DataLab