Matlab Cubic Spline Interpolation Derivation