Implementation of the Bisectional Method

Here are several ways to implement Algorithm 2.1 into a Matlab code: