function v = splinetx(x,y,u) %SPLINETX Textbook spline function. % v = splinetx(x,y,u) finds the piecewise cubic interpolatory % spline S(x), with S(x(j)) = y(j), and returns v(k) = S(u(k)). % % See SPLINE, PCHIPTX. % First derivatives h = diff(x); d