The Math Forum

Search All of the Math Forum:

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

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

Notice: We are no longer accepting new posts, but the forums will continue to be readable.

Topic: looping codes for iterative equation
Replies: 16   Last Post: May 23, 2012 11:10 PM

Advanced Search

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

Posts: 1,717
Registered: 11/8/10
Re: looping codes for iterative equation
Posted: May 23, 2012 2:34 AM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On 23 Mai, 08:18, "relgn ng" <> wrote:
> Hi,
> I have a equation which requires iteration to solve, can show me how the code should be like.
> The equation is like x' = x + 0.002512 - ((sin a/cos a) - 1)^1.5
> SO i will require to assume a random angle of x first
> Then working out the eqn and get x'
> Input x' answer as x into the eqn and get a new x'
> and keep repeating the above until x' = x
> Thanks in advance!!!

Say 0.002512 - ((sin a/cos a) - 1)^1.5 = c.
Then the iteration reads
x_(n+1) = x_(n) + c,
x_(n) = x_(0) + n*c
This iteration won't converge unless c=0 .

Best wishes

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

[Privacy Policy] [Terms of Use]

© The Math Forum at NCTM 1994-2018. All Rights Reserved.