% x is a vector where x(i) = 10^(-i) % this file shows that "f1(x) = 1 + O(h^2)" % and "f2(x) = 0 + O(h^5)" format long e x = zeros(4,1); for i = 1:4 x(i) = 10^(-i); end a = zeros(4,1); for j = 1:4 a(j) = f1(x(j))-1; end b = zeros(4,1); for j = 1:4 b(j) = f2(x(j))-0; end a b