function s=slope(fn,x,delta)
%approximates the slope of the noisy function fn at the point x using
%splines. fn must be able to evaluate at vectors. deltadistance between
%points.
z=x+delta*(-5:5);
eval(['f=', fn,'(z);']);
p=csaps(z,f,2);
fnplt(p);
grid on
der=fnder(p);
s=fnval(der,x);





