Results 1 to 2 of 2

Math Help - fixed point iteration question with matlab

  1. #1
    Newbie
    Joined
    Feb 2010
    Posts
    24

    fixed point iteration question with matlab

    i have a function: f ( h ) = (0,0226 / h^2) + h - 0.5879

    Using fixed point iteration determine h within 0,1 % relative error.

    I modified h= g(h) = 0.5879 - (0,0226 / h^2)

    Then how can i write these functions' fixed point iteration m-file. Can anybody write a example m-file for this kind of problems?
    Follow Math Help Forum on Facebook and Google+

  2. #2
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by chronicals View Post
    i have a function: f ( h ) = (0,0226 / h^2) + h - 0.5879

    Using fixed point iteration determine h within 0,1 % relative error.

    I modified h= g(h) = 0.5879 - (0,0226 / h^2)

    Then how can i write these functions' fixed point iteration m-file. Can anybody write a example m-file for this kind of problems?
    The following script will implement this fixed point iteration but you will need to sort out the stopping condition yourself.

    Code:
    h=1;
    
    err=1;
    while abs(err/h)>0.001
        h1=0.5879-0.0226/h^2;
        err=abs(h-h1);
        h=h1
    end
    
    h
    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. Replies: 6
    Last Post: December 27th 2010, 11:17 PM
  2. Fixed point iteration
    Posted in the Differential Geometry Forum
    Replies: 13
    Last Post: October 21st 2010, 04:36 AM
  3. Convergence of fixed point iteration question
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: April 20th 2010, 05:35 AM
  4. Replies: 4
    Last Post: April 18th 2010, 03:54 PM
  5. Fixed Point Iteration
    Posted in the Differential Geometry Forum
    Replies: 1
    Last Post: November 12th 2009, 01:40 PM

Search Tags


/mathhelpforum @mathhelpforum