Page 143 -
P. 143
The current (expressed in mA) and the voltage (in V) of the source will
appear in your graph window when you execute this program.
Homework Problem
Pb. 5.5 The apparent simplicity of the Newton-Raphson method is very
misleading, suffice it to say that some of the original work on fractals started
with examples from this model.
a. State, to the best of your ability, the conditions that the function,
its derivative, and/or the original guess should satisfy so that this
iterate converges to the correct limit. Supplement your arguments
with geometric sketches that illustrate each of the pathologies.
b. Show that the Newton-Raphson method iterates cannot find the
zero of the function:
y = x − 3
c. Illustrate, with a simple sketch, the reason that this method does
not work in part (b).
5.1.3 MATLAB fsolve and fzero Built-in Functions
Next, we investigate the use of the MATLAB command fsolve for finding
the zeros of any function. We start with a function of one variable.
The recommended sequence of steps for finding the zeros of a function is
as follows:
1. Edit a function M-file for the function under consideration.
2. Plot the curve of the function over the appropriate domain, and
estimate the values of the zeros.
3. Using each of the estimates found in (2) above as an initial “guess,”
use the command fsolve to accurately find each of the roots. The
syntax is as follows:
xroot=fsolve('funname',xguess)
NOTE Actually, the MATLAB command fzero is quite suitable for finding
the zero of a function of one variable. However, we used fsolve in the text
above because it can only be used for the two-variables problem.
© 2001 by CRC Press LLC