The data considered here are the temperatures over a 24 hour period, in two hour increments. So,1= 0,2= 2,3= 4,4= 6, ··· ,13= 24. The yi’s are the corresponding temperatures. For example, the temperatures in Troy, NY on June 21 are given in Table 5.8 (inoF).
(a) Fit this data with: i) a global polynomial using Lagrange interpolation, and ii) a natural cubic spline. Plot these two curves and the data on the same axis. Make sure to include a legend in your plot.
(b) What do each of the two interpolation functions give as the temperature at 11 AM?
(c) What do the two interpolation functions predict the temperature will be at 1 AM the next day?
(d) What do the two interpolation functions predict the temperature will be at 9 AM the next day? Explain why the spline predicts the value it does.
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here