Question: Using Matlab Draw a graph f(x) = sin(10.x) + cos(3x) within a range 3 lessthanorequalto x lessthanorequalto 5 and find all the 6 roots of
Using Matlab
Draw a graph f(x) = sin(10.x) + cos(3x) within a range 3 lessthanorequalto x lessthanorequalto 5 and find all the 6 roots of f(x) within the range using the bisection method. Use bisection.m to solve the problem. function root=bisection(func, x1, xu) xr = xl: es=0.0001: while (1) xrold = xr: xr = (x1 + xu)/2: if xr -= 0 ea = abs((xr - xrold)/xr) * 100: else ea = 100: end if func(xl) * func(xr) 0 xl = xr: else ea = 0: end if ea
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
