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: 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 ]
Torsten

Posts: 1,454
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" <dream_win...@hotmail.com> 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,
thus
x_(n) = x_(0) + n*c
This iteration won't converge unless c=0 .

Best wishes
Torsten.



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.