clear all
more off

J=10;
for k=1:6
    dxval(k)=1/J;
    E(k)=getxerr(J,100000);
    J=J*2;
end
c=polyfit(log(dxval),log(E),1);
disp(sprintf('slope=%g',c(1)));
