%Numerisk derivering, 2:a  ordn, 8/2 2010, LE
a=1;h=1;
fp=exp(1);
res=[];
for k=1:12
    h=h/10;
    fdiff=(exp(a+h)-exp(a-h))/(2*h);
    fel=fdiff-fp;
    res=[res;[h fdiff fel]];
end
disp('         h               diff                 fel')
res