Results 1 to 5 of 5

Math Help - how to write matlab function for solving equation using bisection method

  1. #1
    Newbie
    Joined
    Oct 2009
    Posts
    2

    how to write matlab function for solving equation using bisection method

    my group was given this equation to be solved using matlab software,but i dont know how to write down the function
    since im a first time user of matlab,please help me ASAP

    f(x) = [(4+x)/ (42-2x) 2(30-x)] 0.015
    Lower limit = 0
    Upper limit = 20
    Єs = 0.5 %

    The zero lies approximately at 16 using graphical method
    Now I need to solve this using bisection method using matlab software
    Please help me
    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 mustaqim View Post
    my group was given this equation to be solved using matlab software,but i dont know how to write down the function
    since im a first time user of matlab,please help me ASAP

    f(x) = [(4+x)/ (42-2x) 2(30-x)] 0.015
    Lower limit = 0
    Upper limit = 20
    Єs = 0.5 %

    The zero lies approximately at 16 using graphical method
    Now I need to solve this using bisection method using matlab software
    Please help me
    Try searching for "matlab bisection" you will find a number of hits among which are:

    http://www.mathhelpforum.com/math-he...on-method.html

    http://www.mathhelpforum.com/math-he...on-method.html

    CB
    Follow Math Help Forum on Facebook and Google+

  3. #3
    Member
    Joined
    Mar 2007
    Posts
    206
    Awards
    1
    Matlab has some built_in functions that you may use to check your results too.

    Code:
    EDU>> help fsolve
    This is a very handy routine for root finding. Since you mentioned the bracketing method specifically, the first link CB gave you should be all you need to solve your problem as there is no "fancy" code in that routine so only a basic understanding of Matlab is required.


    Regards Elbarto
    Follow Math Help Forum on Facebook and Google+

  4. #4
    Newbie
    Joined
    Oct 2009
    Posts
    2
    how about to solve this problem using newton rhapson method
    any idea on how to do it
    Follow Math Help Forum on Facebook and Google+

  5. #5
    Grand Panjandrum
    Joined
    Nov 2005
    From
    someplace
    Posts
    14,972
    Thanks
    4
    Quote Originally Posted by mustaqim View Post
    how about to solve this problem using newton rhapson method
    any idea on how to do it
    A search of MHF using the search string "matlab newton" turns up lots of hits including:

    http://www.mathhelpforum.com/math-he...on-method.html

    http://www.mathhelpforum.com/math-he...od-matlab.html

    CB
    Follow Math Help Forum on Facebook and Google+

Similar Math Help Forum Discussions

  1. bisection method .. solving equation ?
    Posted in the Calculus Forum
    Replies: 7
    Last Post: April 5th 2011, 06:48 AM
  2. Matlab bisection method
    Posted in the Math Software Forum
    Replies: 3
    Last Post: April 18th 2010, 10:21 AM
  3. MATLAB for Non Linear Shooting method for solving BVPs
    Posted in the Differential Equations Forum
    Replies: 0
    Last Post: March 21st 2009, 05:54 AM
  4. MATLAB "bisection" method
    Posted in the Math Software Forum
    Replies: 1
    Last Post: February 5th 2009, 04:42 PM
  5. Replies: 0
    Last Post: December 1st 2008, 12:05 PM

Search Tags


/mathhelpforum @mathhelpforum