Question: Problem 3. (3+1+1 points) The following (incomplete) code in Matlab was proposed to use the bisection method in order to compute a root of the

 Problem 3. (3+1+1 points) The following (incomplete) code in Matlab was

Problem 3. (3+1+1 points) The following (incomplete) code in Matlab was proposed to use the bisection method in order to compute a root of the equation tan x - x = 0. % The bisection algorithm for finding % a root of the equation tan(x)-x=0. f=inline ('tan(x)-x'); a=4.3; b=4.6; iter=0; if f(a)*f(b) > error( 'f(a) and f(b) do not have opposite signs' ) else p = (a + b)/2; err = abs(f(p)); while err > 0.01 if f(a) *f (p)>0 .....; else .....; end iter=iter+1; .....; err = abs(f(p)); end end (a) Fill in the lines indicated by the arrows in order to complete the above code. Note: You are NOT allowed to change or remove any other lines of the code

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!