Question: Write a driver code ( script ) to test your code using the function ( ) = 2 3 . Your driver code should, do

Write a driver code (script) to test your code using the function ()=23. Your driver
code should, do the basic housekeeping tasks (clear variables and command window, close all
figures), define as an anonymous function, set the upper and lower limits of the interval to 1
and 2, respectively. Set the tolerance to 1\times 106 and the maximum iterations to 5000. Call
your bisect function to find the root. Print the root and number of iterations with a message.
Plot the function on the interval along with the root found as a circle. How does the true error
compare to the tolerance you used?

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!