% This script begins programming assigment 2 part c
%
% Put the files bisect5d.m and iter8a.m in your working directory.

format long
f=inline('x+sin(x)-3')
alpha=bisect5d(f,2,4)
phi=inline('3-sin(x)')
[x,xn]=iter8a(phi,3,1E-14)
en=xn-alpha
logen=log(abs(en))
n=length(logen)
plot(logen(1:n-1),logen(2:n)) 
