function q6_A(f,xi,h,emax) fi=f; y=xi; hi=h; emaxi=emax; e=100; func=inline(f); xiii=func(xi); n=0; g=xi+h; true=func(g); while(e>emax) func=feval('fdiff',inline(f)); f=char(func); n=n+1; xii=xiii+(func(xi)*h^n/factorial(n)); e = abs(100*(true-xii)/true); xiii=xii; end v=[e, xii, n]; disp(v)