Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: Iteration Script File Help
Date: Sun, 26 Apr 2009 21:27:01 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 8
Message-ID: <gt2jj5$fcl$1@fred.mathworks.com>
References: <gt2i6a$ing$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1240781221 15765 172.30.248.37 (26 Apr 2009 21:27:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Sun, 26 Apr 2009 21:27:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1187260
Xref: news.mathworks.com comp.soft-sys.matlab:535548

"Jerry " <jerrycombes@hotmail.co.uk> wrote in message <gt2i6a$ing$1@fred.mathworks.com>...
> Hi, Im working on matlab, and need to create a script file that will read an initial approximation to a root, and find it to 14 decimal places, aslo making sure no more than 10 iterations are performed. I have created m-files corresponding to my equation and its derivatives in the form f(x)=0 saved a f,df and ddf and now need to create a script file using Halleys method to iterate. Everything I have tried fails, I've read through my textbook multiple times and I have come to a complete standstill. Any help in what I am to do to create a working script file would be greatly appreciated. If anyone is willing to help but feels I'm being unclear please send me a message anyway and I will try to describe what it is I need to do in more detail.
--------------
  You need to describe to us what it is you have tried and even then you can usually expect only outlines for possible procedures.  It is not enough to state "Everything I have tried fails."  Tell us what it is you did that failed.

  It is important that you realize that Halley's iteration method really does work if you start with sufficiently close initial estimates and provided your code faithfully carries out the appropriate processing.  When it succeeds it usually converges extremely rapidly but it is comparatively sensitive to the amount of "miss" in initial estimates.  There is certainly no guarantee that with just any initial guess it will converge at all, much less that it will converge in no more that ten iterations!

Roger Stafford