clear

eta=0.1

w(1)=5;

for i=1:200

w(i+1)=w(i)-eta*(2*(w(i)-3)-sin(w(i))-1/10*exp(-0.1*w(i)))

end

plot(w,'o-')

grid on

axis([0 200 0 5])


w(200)


abs(2*(w(200)-3)-sin(w(200))-1/10*exp(-0.1*w(200)))


----------------------------------------------------

ans =


    3.0717



ans =


   1.5404e-15