iconEuler Reference

Splines

Natural cubic and linear splines.

function spline (x,y)

  Defines the natural Spline at points x(i) with values y(i).
  
  The natural spline is the spline using cubic polynomials
  between the points x[i], smooth second derivative, and linear
  outside the interval x[1] to x[n]. The points x[i] must be sorted.
  
  The function returns the second derivatives at these points. With
  this information, the spline can be evaluated using "splineval".
  
  See: 
splineval (Splines)
function splineval (x,y,h,t)

  Evaluates the cubic interpolation with second derivatives h(i) at t
  
  The second derivatives can be computed with the function "spline".
  The spline is a natural spline. I.e., it is linear outside the
  interval x[1] to x[n].
  
function linsplineval (x,y,t)

  Evaluates the linear interpolating spline for (x(i),y(i)) at t
  
  The linear interpolating spline is a continous function linear
  between the points x[i].

Documentation Homepage