function y = centdiff(f,x,h) % % The function y = centdiff(f,x,h) returns the central difference % approximation for the derivative of f at x, using step size h. %
Answer:
y = ( feval(f,x+h) - feval(f,x-h) ) / ( 2*h );
centdiff('sin',1.3,0.01)
0.2675
Answer:
t = 0:0.01:1;
r = exp(t);
cylinder(t);
% see the paper handout for the sketch...