Third Program: Search and Bisection Method - (HW03) Due: Oct 2, 2017, 11:59 PM Write an M-file to solve an equation with an iterative search and the bisection method Request upper and lower limits for the search and for the bisection. Functions: . Create one (main) function for input and output e Create one sub-function to calculate range of possible solutions from the search . Create one sub-function for a single value of a root using the bisection method. * Create one sub-function to actually calculate a value for the function - f(x)
Explanation / Answer
function [f] = Bisection(a,b,Nmax,TOL) f = x^3 - x^2 + x; i=1; BisectA=f(a); while i