powered by
polyval(p, x)
p
x
poly
roots
# Evaluate 3 x^2 + 2 x + 1 at x = 5, 7, and 9 p = c(3, 2, 1); polyval(p, c(5, 7, 9)) # 86 162 262
Run the code above in your browser using DataLab