x=linspace(0,4,20);
y=exp(3*sin(5*x-0.4)-x/2);
sp1=spline(x,y);
xx=linspace(0,4);
plot(xx,ppval(sp1,xx))
hold 
plot(x,y,'*r')
sp2=spline(x,[1,y,0]);
plot(xx,ppval(sp2,xx),'g')
hold