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 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
Get step-by-step solutions from verified subject matter experts
