Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: Given an iterative equation to solve an equation
Replies: 2   Last Post: Jan 20, 2013 1:27 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Greg Heath

Posts: 5,975
Registered: 12/7/04
Re: Given an iterative equation to solve an equation
Posted: Jan 20, 2013 7:23 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"Jacob" wrote in message <kdf58n$958$1@newscl01ah.mathworks.com>...
> An iterative equation for solving the equation x^2-x-1=0 is given by
> x(r+1)=1+(1/x(r)) for r=0,1,2,...
> Given x0=2, write a Matlab script to solve the equation. Sufficient accuracy is obtained when abs(x(r+1)-x(r))<.0005.
>
> I am a new to Matlab and I am having a hard time really even starting this problem. I was thinking that using some sort of loop until the accuracy condition is met would work. Any help would be much appreciated.
>
> Thanks in advance,
>
> Jacob


Your plan sounds ok to me.

Greg



Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.