Last chance! 50% off unlimited learning
Sale ends in
newtonInterp(x, y, xs = c())
lagrangeInterp(x, y, xs)
xs
of the polynomial defined by x,y
.
xs
).
neville
, barylag
p <- Poly(c(1, 2, 3))
fp <- function(x) polyval(p, x)
x <- 0:4; y <- fp(x)
xx <- linspace(0, 4, 51)
yy <- lagrangeInterp(x, y, xx)
yy <- newtonInterp(x, y, xx)
## Not run:
# ezplot(fp, 0, 4)
# points(xx, yy)## End(Not run)
Run the code above in your browser using DataLab