err = zeros(15,1); for i=1:15 h(i) = 10^(-i); err(i) = 1-(exp(h(i))-exp(-h(i)))/h(i)/2; end format long err format short loglog(h,abs(err))