Similar code produces the second graph, which shows using every 4th point produces an unsatisfactory curve with far too may oscillations. The curve using only the 5 knot point given is the best for this example. A superior spline in example 4.2 Graph. These are stored in the Matlab vectors x and y . Explain mathematically how you would find a, b, and c. Write Matlab code to find a, b, and c and to plot the curve and the data on one graph.
Plot s against t.
On your plot show the best approximation to the data by a polynomial. You will have to try out various degrees. Also show the best approximation by a smooth cubic spline. In your answers explain briefly how you found the best curves, possibly illustrating your answer with graphs of poor curves.