Math Help Forum

Math Help Forum Feed Site Feed

Go Back   Math Help Forum > Math Resources > Mathematics Software Discussion
Reply
 
Thread Tools Display Modes
  #1  
Old October 30th, 2009, 01:54 AM
Newbie
 
Join Date: Oct 2009
Posts: 2
Country:
Thanks: 0
Thanked 0 Times in 0 Posts
mustaqim is on a distinguished road
Send a message via Yahoo to mustaqim
Default 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
Reply With Quote
Advertisement
 
  #2  
Old October 30th, 2009, 06:45 AM
CaptainBlack's Avatar
Grand Panjandrum
 
Join Date: Nov 2005
Location: South of England
Posts: 11,379
Country:
Thanks: 667
Thanked 3,619 Times in 2,916 Posts
CaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond repute
Default

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:

MATLAB "bisection" method

Mathlab help Bisection Method

CB
__________________
Truth does not change because it is, or is not, believed by a majority of the people.

Giordano Bruno
Reply With Quote
  #3  
Old October 30th, 2009, 07:56 AM
Member
 
Join Date: Mar 2007
Posts: 104
Country:
Thanks: 17
Thanked 14 Times in 14 Posts
elbarto is on a distinguished road
Default

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
Reply With Quote
  #4  
Old October 30th, 2009, 10:54 AM
Newbie
 
Join Date: Oct 2009
Posts: 2
Country:
Thanks: 0
Thanked 0 Times in 0 Posts
mustaqim is on a distinguished road
Send a message via Yahoo to mustaqim
Default

how about to solve this problem using newton rhapson method
any idea on how to do it
Reply With Quote
  #5  
Old October 30th, 2009, 02:29 PM
CaptainBlack's Avatar
Grand Panjandrum
 
Join Date: Nov 2005
Location: South of England
Posts: 11,379
Country:
Thanks: 667
Thanked 3,619 Times in 2,916 Posts
CaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond reputeCaptainBlack has a reputation beyond repute
Default

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:

Matlab: Newton-Raphson Method

Help with Newton's Method in Matlab

CB
__________________
Truth does not change because it is, or is not, believed by a majority of the people.

Giordano Bruno
Reply With Quote
Reply

Tags
bisection method, matlab

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
Forum Jump


All times are GMT -7. The time now is 11:26 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 ©2008, Crawlability, Inc.
©2005 - 2009 Math Help Forum


Math Help Forum is a community of maths forums with an emphasis on maths help in all levels of mathematics.
Register to post your math questions or just hang out and try some of our math games or visit the arcade.