powered by
Evaluate a polynomial at given points.
polyval(coef, z)
coefficients of the polynomial, defined in decreasing power.
the points at which to evaluate the polynomial.
An array of length(z), the polynomial evaluated at each element of z.
length(z)
z
poly, roots
poly
roots
# NOT RUN { polyval(c(1, 0, -2), 1:3) # s^2 - 2 # }
Run the code above in your browser using DataLab