Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predict.charpn

Calculate the value of a characteristic polynomial for a polyMatrix argument


Description

The ‘polynom::predict.polynomial()’ method works by real coefficients only but it works for real or complex and matrix argument also. But in the case of matrix argument uses the elementwise product. The ‘polyMatrix::predict’ method evaluate the polynom by the usual matrix product definition.

Usage

## S3 method for class 'charpn'
predict(object,pM,...)

Arguments

object

a ‘charpn’ class object

pM

a ‘polyMatrix’ class object

...

additional arguments

Value

value

A ‘polynomial’ class object

See Also

Examples

pm <- polyMgen.d(2,2,rawData=ch2pn(c("1","x^2","x","0")))
pm # 1, z^2\\ z, 0

predict(pm,2) # matrix(c(1,4,2,0),2)

# predict the result of a linear model
x <- 1:5;y <- rnorm(5);predict(lm(y~x)) # the used method: predict.lm()

# clean up
# rm(pm, x, y)

polyMatrix

Infrastructure for Manipulation Polynomial Matrices

v0.3.1
MIT + file LICENSE
Authors
Tamas Prohle [aut], Peter Prohle [aut], Nikolai Ryzhkov [aut, cre], Ildiko Laszlo [aut] (<https://orcid.org/0000-0003-2324-8183>), Ulas Onat Alakent [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.