Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Matlab

Subject: Matlab

From: Kevin Sze

Date: 11 Mar, 2010 18:50:23

Message: 1 of 3

Write a function m-file with input a,b that outputs the first 20 iterations of the Bisection Method to find a root of the equation f(x)=0. The m-file should output the root to 15 decimal places.(include a short comments on each line to explain the commands used)
How to do this question? If anyone know, please help me. Thank you.

Subject: Matlab

From: Roger Stafford

Date: 11 Mar, 2010 19:18:38

Message: 2 of 3

"Kevin Sze" <kevin_sze9@hotmail.com> wrote in message <hnbe1f$l25$1@fred.mathworks.com>...
> Write a function m-file with input a,b that outputs the first 20 iterations of the Bisection Method to find a root of the equation f(x)=0. The m-file should output the root to 15 decimal places.(include a short comments on each line to explain the commands used)
> How to do this question? If anyone know, please help me. Thank you.

  We won't do your homework for you but see:

 http://en.wikipedia.org/wiki/Bisection_method

Note: Don't be fooled into performing only 20 iterations! It will almost certainly require many more than that to get an accuracy of 15 decimal places for your root.

Subject: Matlab

From: someone

Date: 11 Mar, 2010 19:18:38

Message: 3 of 3

"Kevin Sze" <kevin_sze9@hotmail.com> wrote in message <hnbe1f$l25$1@fred.mathworks.com>...
> Write a function m-file with input a,b that outputs the first 20 iterations of the Bisection Method to find a root of the equation f(x)=0. The m-file should output the root to 15 decimal places.(include a short comments on each line to explain the commands used)
> How to do this question? If anyone know, please help me. Thank you.

Take a look at this link (for the pseudo code):

http://en.wikipedia.org/wiki/Bisection_method

Then code it in MATLAB.
If you still need help see the MATLAB "Getting Started" Documentation at:

http://www.mathworks.com/access/helpdesk/help/techdoc/learn_matlab/bqr_2pl.html

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us