f = @(x) exp(x);
df = f;

h = 1 ./ 2.^(1:10);
err = zeros(1,length(h));

for n = 1:length(h)
	dfApprox = (f(h(n))-f(-h(n))) / (2*h(n));
	err(n) = abs(dfApprox-df(0));
end

loglog(h, err, '.-', 'linewidth', 2, 'markersize', 20);
xlabel('h');
ylabel('error');