首页 > > 详细

调试CMPSC/Mathematics 455、Matlab辅导、调试Matlab、Matlab语言讲解留学生

CMPSC/Mathematics 455
MATLAB Assignment Two
Due 19 October 2018
Fall 2018
You are to write a MATLAB script. or function based upon problem 16, p.62
of the text book.
In that problem, it is pointed out that
f(x; ) = cosh(x=4) x
has two roots for = 2 and no roots for = 10. The question is asked
whether there is a value of for which there is only one root. The answer to
that question is yes and it is a double root. That is, a value where there
is a root x such that
f(x ; ) = 0; f0(x ; ) = 0:
The di erentiation is with respect to x not .
We can solve for x and by setting up a nonlinear equation in two
variables. Let
We then solve
F(z) = 0 (1)
using Newton’s method.
You will try two separate intial guesses z(0) for the root z =
You should get almost the same answer for both initial guesses.
With tol = 10 14 = 1e 14, use Newton’s method to produce the sequence
of iterates fz(k)g, until either
kz(k 1) z(k)k1 tol maxfkz(k)k1;tolg
or k = 20. You should only have to store the two most recent iterates. For
each of the two initial guesses produce your nal values of x , and the
number of iterations k. Of course, here z(k) =
I strongly recommend producing a function (I will call it prob16 fun)
that has the rst line
function [F;J] = prob16 fun(z)
where F is the 2-vector F(z), the function value at the point z and J is
the 2 2 Jacobian matrix for F evaluated at z.(Yes, part of this problem
is guring out what the Jacobian is.) You can then build the script. around
this function. Your program with all scripts, functions, and output should
be turned in on Canvas by midnight on the due date.

联系我们
  • QQ:99515681
  • 邮箱:99515681@qq.com
  • 工作时间:8:00-21:00
  • 微信:codinghelp
热点标签

联系我们 - QQ: 99515681 微信:codinghelp
程序辅导网!