%
% Script File: h4test.m 
% Solutions for nonlinear equations
% (1)
fzero(@(x)(exp(x)-1.5-atan(x)),1.0)
subplot(2,1,1)
X=-16:0.5:2;
Y=exp(X)-1.5-atan(X);
V=[-16, 12,-4,4];
plot(X,Y,'b-',[-14,10127],[0],'ro'); axis(V); grid
title('y=e^x-1.5-tan^{-1}(x)')
% (2)
fzero(@(x)(x^3-6*x^2+11*x-6),2.4)
subplot(2,1,2)
X=0:0.2:8;
Y=X.^3-6*X.^2+11*X-6;
V=[0,8, -8,40];
plot(X,Y,'b-',[3],[0],'ro'); axis(V); grid
title('y=x^3-6x^2+11x-6')