Description Usage Arguments Details Value Examples
Calculate the coefficients of a polynomial relative to a new origin on the x axis.
1 | change.origin(p, o)
|
p |
an object of class |
o |
a numeric scalar representing the new origin on the original scale. |
Let P(x) = ∑_i p_i x^i be a given polynomial and consider writing P(x) = ∑_j q_j (x - o)^j. This function calculates the coefficients q_j and returns the result as a polynomial.
A polynomial with coefficients relative to the re-located x axis.
1 2 3 4 5 | pr <- poly.calc(1:5)
pr
## -120 + 274*x - 225*x^2 + 85*x^3 - 15*x^4 + x^5
change.origin(pr, 3)
## 4*x - 5*x^3 + x^5
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.