polypow | R Documentation |
Power of a polynomial.
polypow(p, n)
p |
vector representing a polynomial. |
n |
positive integer, the exponent. |
Uses polymul
to multiply the polynomial p
n
times
with itself.
Vector representing a polynomial.
There is no such function in Matlab or Octave.
polymul
polypow(c(1, -1), 6) #=> (x - 1)^6 = (1 -6 15 -20 15 -6 1)
polypow(c(1, 1, 1, 1, 1, 1), 2) # 1 2 3 4 5 6 5 4 3 2 1
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.