clear clc

X=-5:5; 
Y=runge(X); 
x=-5:0.05:5; 

plot(X,Y,'*',x,runge(x),'r',x,cspline(X,Y,x))

figure

plot(x,runge(x)-cspline(X,Y,x))