| polytrans {pracma} | R Documentation |
Transform a polynomial.
polytrans(p, q)
p, q |
vectors representing two polynomials. |
Transforms polynomial p replacing occurences of x with
another polynomial q in x.
Vector representing a polynomial.
There is no such function in Matlab or Octave.
# (x+1)^2 + (x+1) + 1 polytrans(c(1, 1, 1), c(1, 1)) #=> 1 3 3 polytrans(c(1, 1, 1), c(-1, -1)) #=> 1 1 1