subject

Write a MATLAB function, called bisection_method that inputs a function f, two numbers a, b, an error tolerance, tol, and a maximum number of iterations, N, and finds a root c of f in the interval [a, b] using the bisection method. Your function should compute a bound on the error, and stop when the error is less than the tolerance, or if the number of iterations exceeds N - whichever happens first. • Hint #1: The function should start with the line function [c, n,err] = bisection_method(f, a,b, tol, N)
• Hint #2: The function should contain a ‘while’ loop, looking something like: while err > tol && n < N
c) Use the code that you developed in Problem 2 to solve f(x)-(2t3 + 3x-1) cos(x)-x 0 in [-1, 1, for an accuracy of 10
i. What is the number, n of iterations used?
ii. What is the error bound?
iii. What is the expected rate of convergence?
iv. Plot on the same graph the function f and the axis y 0.
v. Using the built-in function solve from Matlab, compute the exact root and compare to your solution

ansver
Answers: 1

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 18:30
Which of the following commands is more recommended while creating a bot?
Answers: 1
question
Computers and Technology, 23.06.2019 16:00
Kenny works with an it company. his company is about to launch new software in the market. he has to ensure that this new software is functional and meets all of the quality standards set up at the planning stage. which job profile is kenny likely to have? kenny is likely to have the job profile of a blank .
Answers: 2
question
Computers and Technology, 23.06.2019 17:00
Companies that implement and apply an information system effectively can create
Answers: 1
question
Computers and Technology, 23.06.2019 22:50
What is an rss reader used for? for creating a user account on a social new site
Answers: 2
You know the right answer?
Write a MATLAB function, called bisection_method that inputs a function f, two numbers a, b, an erro...
Questions
question
Mathematics, 20.03.2020 06:54
question
Mathematics, 20.03.2020 06:54
question
Mathematics, 20.03.2020 06:55
Questions on the website: 13722361