Cubic Spline Interpolation
Function: - Cubic Spline Interpolation 5
By increasing x this function has the ability to increase the oscillation frequency. The number of nodes used has been decreased to 100 nodes skipping some of the maximums. Still the interpolation graph is good and follows the function well. It can be seen that the Cubic Spline Interpolation max and min are not equal to the expected function max and min which are -1 and 1. To get better results the number of fitted nodes is increased from 100 to 200.

Graph 9. Function: - Cubic Spline Interpolation with 100 fitted nodes. The interpolation follows the function well but the maximum and minimums are not as expected, 1 and -1. Still this represents a superior Cubic Spline interpolation. The liner interpolation (blue curve) is very different from the expected cosine function while the Cubic Spline interpolation (orange curve) has followed the cosine shape very well.

Graph 10. Function shows a superior Cubic Spline interpolation compared to a linear interpolation. Both interpolations use 100 fitted nodes.

Graph 12. Function showing superior Cubic Spline interpolations with 200 nodes
compared to 100 node Cubic Spline interpolation. The value of maximums and minimums are 1 and -1 and so the curves are meeting now.

Graph 12. Function showing zoomed Graph 11 the maximums of Cubic Spline interpolations with fitted 200 nodes. Linear interpolation - green line misses the peak at 5.26 to 5.33 interval but the blue Cubic Spline which achieves the maximum value.

Graph 13. Zoomed Graph 11. Function showing Cubic Spline (blue line). Results are the same as Grpah12 linear interpolation gives poor results compared to Cubic Spline interpolation.
|