6. Cubic Splines (Matlab) (6 points)
(a) Use Matlab to create a regular grid x of data points in the range from 0 to 10 with a grid spacing
h = 0:5. Calculate an array y of values of the cosine function at the data points in x. Then
generate a second grid xx of points in the interval 0 to 10 with a spacing of h = 0:125. Use the
Matlab function spline to evaluate the natural cubic spline that interpolates the cosine values in
x,y at the data points in xx.