There are thousands of bisection codes in the internet written in MATLAB. Just search and use one of them if you are not willing or capable to write it on your own.
One code out of the thousand:
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!