x <- c( 0, 2, 3, 5, 6, 8, 9, 11, 12, 14, 15)
y <- c(10, 10, 10, 10, 10, 10, 10.5, 15, 50, 60, 85)
plot(x, y, col="blue"); grid()
xi <- linspace(0,15,51)
yi <- akimaInterp(x, y, xi)
lines(xi, yi, col = "darkred")
x <- 1:10
x <- c(0, 1, 3, 4, 6, 7, 9, 10, 12, 13, 15)
Run the code above in your browser using DataLab