x=1:10;
y=cos(x);
n=length(x);
xi=linspace(x(1),x(n),100);
yi=ddfun(x,y,xi);
plot(x,y,'o',xi,yi)
