| polymul {pracma} | R Documentation |
Multiply two polynomials given as vectors.
polymul(p, q)
p, q |
Vectors representing two polynomials. |
Polynomial multiplication realized simply by multiplying and summing up all the coefficients.
Vector representing a polynomial.
conv also realizes polynomial multiplication, through Fast Fourier
Transformation, with the drawback that small imaginary parts may evolve.
conv, deconv
# Multiply x^2 + x + 1 with itself polymul(c(1, 1, 1), c(0, 1, 1, 1)) #=> 1 2 3 2 1