Multiplication of Two Polynomials
Multiplication of two polynomials.
polyMul(p, q)
p |
coefficients of first polynomial |
q |
coefficients of second polynomial |
inputs are vectors of coefficients in order of power ax^0 + bx^1 + cx^2 + ...
coefficients of the product in order of power
D.S. Stoffer
based on code from the polymatrix package https://github.com/namezys/polymatrix
a = 1:3 # 1 + 2x + 3x^2 b = 1:2 # 1 + 2x polyMul(a, b) # [1] 1 4 7 6 # 1 + 4x + 7x^2 + 6x^3
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.