% uses the midpoint rule to estimate f''(x) % function y = dd_mid(x,h) function y = f(x,h) y = (f(x+h)-2*f(x)+f(x-h))/(h^2);