- Plotting Issue with Cubic Spline: The line "plot(xspace2,S,'g')" seems to be incorrect because "xspace2" is used for polynomial interpolation, not for cubic spline interpolation. You probably meant to plot "xspace3" against "S" for the cubic spline part:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1696601/image.jpeg)