xdata = 1:5;
ydata = [-10, 10, 10.5 , 11, 20] ;
plot(xdata,ydata,'ok')
hold on
xgrid = 1:0.1:5;
spl = spline(xdata,ydata);
pch = pchip(xdata,ydata);
plot(xgrid,ppval(spl,xgrid),'-.k')
plot(xgrid,ppval(pch,xgrid),'k')
hold off
