1 x=[1 2 3 4 5 6]; 2 y=[3 6 8 13 31 24]; 3 xx=linspace(1,6); 4 yy=spline(x,y,xx); 5 plot(xx,yy,'r',x,y,'o')