Awaiting some suggestion. Was my question not very understandable? Please let 
me know how can I offer more elaborate clarification.
Additionally, I would like to solve the determinant of "p1" for the values of 
"z" (I am working with some multivariate time series modelling). When I use 
det() function, it am getting error that, that function is not for objects with 
class polynomial.
Any idea please?
Thanks,

--- On Wed, 13/10/10, Ron_M <ron_michae...@yahoo.com> wrote:

From: Ron_M <ron_michae...@yahoo.com>
Subject: [R] Problem to create a matrix polynomial
To: r-help@r-project.org
Date: Wednesday, 13 October, 2010, 4:31 PM


Dear all R users, I was trying to create a polymonial using the polynom() of
"PolynomF" package. My problem is, if I pass coefficients as simple
numerical values, it is working, but for matrix coefficient it is not. Here
is my try:

library(PolynomF)
z <- polynom()

## following is working
p1 <- 1- 4.5*z

## However following is not giving results as intended
p1 <- diag(3)- matrix(1:9, 3,3)*z

In the 2nd example, I was expecting a matrix polynomial in "z" upto degree
1, which I did not get. Can anyone please correct me how to address this
problem?

Thanks,
-- 
View this message in context: 
http://r.789695.n4.nabble.com/Problem-to-create-a-matrix-polynomial-tp2993411p2993411.html
Sent from the R help mailing list archive at Nabble.com.

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.



        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to