pchip
This function returns piecewise cubic hermite interpolating polynomial.
Calling Sequence
d=pchip(x,y)
d= pchip(x,y,xx)
Parameters
x:
points at which the function is defined
y:
function of variable xNote that the lengths of x and y should be the same.
xx:
points of interpolation
d:
vector of interpolantant at xx
Examples
x=[0 1 2 3 4 5]
y=[1 0 1 0 1 0]
xx=linspace(0,5,800)
v=pchip(x, y)
v=pchip(x,y,xx)
plot(x,y,xx,v,'o')