
s=0:0.1:16;
x=0; y=0;

exactvalue=3;

for index=1:length(s)
    h_exp=s(index);
    h=10^(-h_exp);
    g2approx=( g(x+h,y)+g(x-h,y)+g(x,y+h)+g(x,y-h)-4*g(x,y) )/(h^2);
    abserr(index)=abs(g2approx-exactvalue);
    fprintf('\n \t [h]: %2.2e [ABS.ERR.]: %2.2e',h,abserr(index))
end

semilogy(s,abserr);
